Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgaspar committed May 9, 2022
1 parent b5246e1 commit 9225bd4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/integration_tests/databases/api_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -2402,10 +2402,11 @@ def test_validate_sql(self):
"template_params": None,
}

self.login(username="admin")
example_db = get_example_database()
if example_db.backend not in ("presto", "postgresql"):
pytest.skip("Only presto and PG are implemented")

self.login(username="admin")
uri = f"api/v1/database/{example_db.id}/validate_sql"
rv = self.client.post(uri, json=request_payload)
response = json.loads(rv.data.decode("utf-8"))
Expand All @@ -2427,9 +2428,11 @@ def test_validate_sql_errors(self):
"template_params": None,
}

self.login(username="admin")
example_db = get_example_database()
if example_db.backend not in ("presto", "postgresql"):
pytest.skip("Only presto and PG are implemented")

self.login(username="admin")
uri = f"api/v1/database/{example_db.id}/validate_sql"
rv = self.client.post(uri, json=request_payload)
response = json.loads(rv.data.decode("utf-8"))
Expand Down

0 comments on commit 9225bd4

Please sign in to comment.