mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore(tests): Remove ineffectual login (#27149)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user