Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
LeoQuote committed Aug 8, 2023
1 parent 671ed0f commit 8a59932
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions sql/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1736,16 +1736,23 @@ def test_sqladvisor(self, _subprocess):
# test db_name
r = self.client.post(
path="/slowquery/optimize_sqladvisor/",
data={"sql_content": "select 1;", "instance_name": "test_instance", "db_name": "--help"},
data={
"sql_content": "select 1;",
"instance_name": "test_instance",
"db_name": "--help",
},
)
self.assertEqual(json.loads(r.content)["status"], 1)
r = self.client.post(
path="/slowquery/optimize_sqladvisor/",
data={"sql_content": "select 1;", "instance_name": "test_instance", "db_name": ";drop table"},
data={
"sql_content": "select 1;",
"instance_name": "test_instance",
"db_name": ";drop table",
},
)
self.assertEqual(json.loads(r.content)["status"], 1)


@patch("sql.plugins.plugin.subprocess")
def test_soar(self, _subprocess):
"""
Expand Down

0 comments on commit 8a59932

Please sign in to comment.