mirror of
https://github.com/getredash/redash.git
synced 2026-03-22 10:00:17 -04:00
10 lines
466 B
Python
10 lines
466 B
Python
from tests import BaseTestCase
|
|
from redash.models import DataSource
|
|
from redash.utils.configuration import ConfigurationContainer
|
|
|
|
|
|
class TestDataSourceCreate(BaseTestCase):
|
|
def test_adds_data_source_to_default_group(self):
|
|
data_source = DataSource.create_with_group(org=self.factory.org, name='test', options=ConfigurationContainer.from_json('{"dbname": "test"}'), type='pg')
|
|
self.assertIn(self.factory.org.default_group.id, data_source.groups)
|