fix(tests): Ensure fixture is invoked (#29352)

This commit is contained in:
John Bodley
2024-06-25 10:17:58 -07:00
committed by GitHub
parent 708afb7146
commit d69363ef11

View File

@@ -71,7 +71,6 @@ QUERY_3 = "SELECT * FROM birth_names LIMIT 10"
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()
@@ -419,6 +418,7 @@ class TestSqlLab(SupersetTestCase):
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
@@ -438,6 +438,7 @@ class TestSqlLab(SupersetTestCase):
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
@@ -522,6 +523,7 @@ class TestSqlLab(SupersetTestCase):
{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