add sql special chars test
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
weeman 2021-07-26 19:30:50 +02:00
parent f2ea02f7e3
commit 840cf8830d
Signed by: weeman
GPG Key ID: 34F0524D4DA694A1

View File

@ -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"]