Skip to content

Commit

Permalink
Make use of __future__ for prettier types
Browse files Browse the repository at this point in the history
  • Loading branch information
Usiel committed Jan 12, 2023
1 parent c0b3679 commit a4b3224
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/integration_tests/embedded/test_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
from __future__ import annotations

from typing import TYPE_CHECKING
from unittest import mock

Expand All @@ -39,7 +41,7 @@
"superset.extensions.feature_flag_manager._feature_flags",
EMBEDDED_SUPERSET=True,
)
def test_get_embedded_dashboard(client: "FlaskClient[Any]"):
def test_get_embedded_dashboard(client: FlaskClient[Any]):
dash = db.session.query(Dashboard).filter_by(slug="births").first()
embedded = EmbeddedDAO.upsert(dash, [])
uri = f"embedded/{embedded.uuid}"
Expand All @@ -52,7 +54,7 @@ def test_get_embedded_dashboard(client: "FlaskClient[Any]"):
"superset.extensions.feature_flag_manager._feature_flags",
EMBEDDED_SUPERSET=True,
)
def test_get_embedded_dashboard_referrer_not_allowed(client: "FlaskClient[Any]"):
def test_get_embedded_dashboard_referrer_not_allowed(client: FlaskClient[Any]):
dash = db.session.query(Dashboard).filter_by(slug="births").first()
embedded = EmbeddedDAO.upsert(dash, ["test.example.com"])
uri = f"embedded/{embedded.uuid}"
Expand All @@ -64,7 +66,7 @@ def test_get_embedded_dashboard_referrer_not_allowed(client: "FlaskClient[Any]")
"superset.extensions.feature_flag_manager._feature_flags",
EMBEDDED_SUPERSET=True,
)
def test_get_embedded_dashboard_non_found(client: "FlaskClient[Any]"):
def test_get_embedded_dashboard_non_found(client: FlaskClient[Any]):
uri = f"embedded/bad-uuid"
response = client.get(uri)
assert response.status_code == 404

0 comments on commit a4b3224

Please sign in to comment.