You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by jo...@apache.org on 2023/11/13 16:40:59 UTC
(superset) branch master updated: test: Reduce flaky integration tests triggered by `test_get_tag` (#25958)
This is an automated email from the ASF dual-hosted git repository.
johnbodley pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new c3249dd97d test: Reduce flaky integration tests triggered by `test_get_tag` (#25958)
c3249dd97d is described below
commit c3249dd97d23a858a76dcac9d6ce9236df99d453
Author: Sebastian Liebscher <11...@users.noreply.github.com>
AuthorDate: Mon Nov 13 17:40:52 2023 +0100
test: Reduce flaky integration tests triggered by `test_get_tag` (#25958)
---
tests/integration_tests/tags/api_tests.py | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/tests/integration_tests/tags/api_tests.py b/tests/integration_tests/tags/api_tests.py
index b678569933..863288a3e7 100644
--- a/tests/integration_tests/tags/api_tests.py
+++ b/tests/integration_tests/tags/api_tests.py
@@ -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
@@ -121,13 +123,14 @@ class TestTagApi(SupersetTestCase):
"""
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,