chore(tests): Remove ineffectual login (#27149)

This commit is contained in:
John Bodley
2024-04-09 09:52:02 -07:00
committed by GitHub
parent ae0f2ce3c1
commit 481a63da55
47 changed files with 857 additions and 802 deletions

View File

@@ -24,6 +24,7 @@ from superset import db
from superset.daos.dashboard import EmbeddedDashboardDAO
from superset.models.dashboard import Dashboard
from tests.integration_tests.base_tests import SupersetTestCase
from tests.integration_tests.constants import ADMIN_USERNAME
from tests.integration_tests.fixtures.birth_names_dashboard import (
load_birth_names_dashboard_with_slices,
load_birth_names_data,
@@ -39,7 +40,7 @@ class TestEmbeddedDashboardApi(SupersetTestCase):
EMBEDDED_SUPERSET=True,
)
def test_get_embedded_dashboard(self):
self.login("admin")
self.login(ADMIN_USERNAME)
self.dash = db.session.query(Dashboard).filter_by(slug="births").first()
self.embedded = EmbeddedDashboardDAO.upsert(self.dash, [])
uri = f"api/v1/{self.resource_name}/{self.embedded.uuid}"
@@ -47,7 +48,7 @@ class TestEmbeddedDashboardApi(SupersetTestCase):
self.assert200(response)
def test_get_embedded_dashboard_non_found(self):
self.login("admin")
self.login(ADMIN_USERNAME)
uri = f"api/v1/{self.resource_name}/bad-uuid"
response = self.client.get(uri)
self.assert404(response)