mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix(tests): flaky test with dttm on Query API (#11526)
* fix(tests): flaky test wirh dttm on Query API
This commit is contained in:
committed by
GitHub
parent
5e32235041
commit
6f2e36dd1b
@@ -65,6 +65,7 @@ class TestQueryApi(SupersetTestCase):
|
||||
rows=rows,
|
||||
tab_name=tab_name,
|
||||
status=status,
|
||||
changed_on=datetime(2020, 1, 1),
|
||||
)
|
||||
db.session.add(query)
|
||||
db.session.commit()
|
||||
@@ -326,12 +327,10 @@ class TestQueryApi(SupersetTestCase):
|
||||
Query API: Test get list query filter changed_on
|
||||
"""
|
||||
self.login(username="admin")
|
||||
now_time = datetime.now()
|
||||
yesterday_time = now_time - timedelta(days=1)
|
||||
arguments = {
|
||||
"filters": [
|
||||
{"col": "changed_on", "opr": "lt", "value": str(now_time)},
|
||||
{"col": "changed_on", "opr": "gt", "value": str(yesterday_time)},
|
||||
{"col": "changed_on", "opr": "lt", "value": "2020-02-01T00:00:00Z"},
|
||||
{"col": "changed_on", "opr": "gt", "value": "2019-12-30T00:00:00Z"},
|
||||
]
|
||||
}
|
||||
uri = f"api/v1/query/?q={prison.dumps(arguments)}"
|
||||
|
||||
Reference in New Issue
Block a user