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

test: Reduce flaky integration tests triggered by test_get_tag #25958

Merged
merged 2 commits into from
Nov 13, 2023
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
17 changes: 10 additions & 7 deletions tests/integration_tests/tags/api_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
# isort:skip_file
"""Unit tests for Superset"""
import json
from datetime import datetime

from flask import g
import pytest
import prison
from freezegun import freeze_time
from sqlalchemy.sql import func
from sqlalchemy import and_
from superset.models.dashboard import Dashboard
Expand Down Expand Up @@ -121,13 +123,14 @@ def test_get_tag(self):
"""
Query API: Test get query
"""
tag = self.insert_tag(
name="test get tag",
tag_type="custom",
)
self.login(username="admin")
uri = f"api/v1/tag/{tag.id}"
rv = self.client.get(uri)
with freeze_time(datetime.now()):
tag = self.insert_tag(
name="test get tag",
tag_type="custom",
)
self.login(username="admin")
uri = f"api/v1/tag/{tag.id}"
rv = self.client.get(uri)
self.assertEqual(rv.status_code, 200)
expected_result = {
"changed_by": None,
Expand Down
Loading