Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(tests): Ensure fixture is invoked #29352

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion tests/integration_tests/sqllab_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@
class TestSqlLab(SupersetTestCase):
"""Testings for Sql Lab"""

@pytest.mark.usefixtures("load_birth_names_data")
def run_some_queries(self):
db.session.query(Query).delete()
db.session.commit()
Expand Down Expand Up @@ -419,6 +418,7 @@ def test_sql_limit(self):
self.assertEqual(len(data["data"]), 1200)
self.assertEqual(data["query"]["limitingFactor"], LimitingFactor.NOT_LIMITED)

@pytest.mark.usefixtures("load_birth_names_data")
def test_query_api_filter(self) -> None:
"""
Test query api without can_only_access_owned_queries perm added to
Expand All @@ -438,6 +438,7 @@ def test_query_api_filter(self) -> None:
assert admin.first_name in user_queries
assert gamma_sqllab.first_name in user_queries

@pytest.mark.usefixtures("load_birth_names_data")
def test_query_api_can_access_all_queries(self) -> None:
"""
Test query api with can_access_all_queries perm added to
Expand Down Expand Up @@ -522,6 +523,7 @@ def test_query_api_can_access_sql_editor_id_associated_queries(self) -> None:
{r.get("sql") for r in self.get_json_resp(url)["result"]},
)

@pytest.mark.usefixtures("load_birth_names_data")
def test_query_admin_can_access_all_queries(self) -> None:
"""
Test query api with all_query_access perm added to
Expand Down
Loading