Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmud committed Jul 26, 2022
1 parent d400ac4 commit ee37fbc
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions tests/integration_tests/sqllab_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,14 +410,13 @@ def test_search_query_on_text(self):
def test_search_query_filter_by_time(self):
self.run_some_queries()
self.login("admin")
first_query_time = (
db.session.query(Query).filter_by(sql=QUERY_1).one()
).start_time
second_query_time = (
db.session.query(Query).filter_by(sql=QUERY_2).one()
).start_time
# pylint: disable=line-too-long
url = f"/superset/search_queries?from={floor(first_query_time)}&to={ceil(second_query_time)}"
from_time = floor(
(db.session.query(Query).filter_by(sql=QUERY_1).one()).start_time
)
to_time = ceil(
(db.session.query(Query).filter_by(sql=QUERY_2).one()).start_time
)
url = f"/superset/search_queries?from={from_time}&to={to_time}"
assert len(self.client.get(url).json) == 2

def test_search_query_only_owned(self) -> None:
Expand Down

0 comments on commit ee37fbc

Please sign in to comment.