This is an automated email from the ASF dual-hosted git repository. hugh pushed a commit to branch improvedfixtures in repository https://gitbox.apache.org/repos/asf/superset.git
commit 631e0c66c752ebef9ef64b9693cc0d7be9a256f4 Author: hughhhh <[email protected]> AuthorDate: Mon Feb 22 10:10:04 2021 -0500 wip pattern --- tests/core_tests.py | 9 ++------- tests/fixtures/test_conn.py | 7 +++++++ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/core_tests.py b/tests/core_tests.py index 912b23b..295936d 100644 --- a/tests/core_tests.py +++ b/tests/core_tests.py @@ -67,6 +67,7 @@ from superset.views.database.views import DatabaseView from .base_tests import SupersetTestCase from tests.fixtures.world_bank_dashboard import load_world_bank_dashboard_with_slices +from tests.fixtures.test_conn import bad_database_test_conn_request logger = logging.getLogger(__name__) @@ -508,13 +509,7 @@ class TestCore(SupersetTestCase): expected_body, ) - data = json.dumps( - { - "uri": "mssql+pymssql://url", - "name": "examples", - "impersonate_user": False, - } - ) + data = bad_database_test_conn_request() response = self.client.post( "/superset/testconn", data=data, content_type="application/json" ) diff --git a/tests/fixtures/test_conn.py b/tests/fixtures/test_conn.py new file mode 100644 index 0000000..0829a5b --- /dev/null +++ b/tests/fixtures/test_conn.py @@ -0,0 +1,7 @@ +import json + + +def bad_database_test_conn_request(): + return json.dumps( + {"uri": "mssql+pymssql://url", "name": "examples", "impersonate_user": False,} + )
