add sql special chars test
This commit is contained in:
parent
f2ea02f7e3
commit
840cf8830d
@ -22,6 +22,13 @@ class TestFindProfilesEndpoint(ApiTest):
|
|||||||
self.assertEqual(response.status_code, 200)
|
self.assertEqual(response.status_code, 200)
|
||||||
self.assertEqual(response.json, {"total": 0, "profiles": []})
|
self.assertEqual(response.json, {"total": 0, "profiles": []})
|
||||||
|
|
||||||
|
def test_find_sql_specialchars(self):
|
||||||
|
token = self.login("peter", "geheim")["token"]
|
||||||
|
|
||||||
|
response = self.client.get("/users/profiles?nickname=%22%27%25", headers={"Authorization": "Bearer " + token})
|
||||||
|
self.assertEqual(response.status_code, 200)
|
||||||
|
self.assertEqual(response.json, {"total": 0, "profiles": []})
|
||||||
|
|
||||||
def test_find_all(self):
|
def test_find_all(self):
|
||||||
token = self.login("peter", "geheim")["token"]
|
token = self.login("peter", "geheim")["token"]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user