From 367059ddef14a495e277f68ceaf3455c092f839d Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 11 Apr 2023 12:27:23 +0200 Subject: bandit checker: mark false security issues - fix security issues (low severity) --- ishtar_common/tests.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ishtar_common/tests.py') diff --git a/ishtar_common/tests.py b/ishtar_common/tests.py index 97002f13d..7328a5f95 100644 --- a/ishtar_common/tests.py +++ b/ishtar_common/tests.py @@ -171,7 +171,8 @@ def create_superuser(): return username, password, user -def create_user(username="username678", password="dcbqj756aaa456!@%"): +# nosec: hard coded password used for test +def create_user(username="username678", password="dcbqj756aaa456!@%"): # nosec q = User.objects.filter(username=username) if q.count(): return username, password, q.all()[0] @@ -245,7 +246,8 @@ class SearchText: SEARCH_URL = "" def _test_search(self, client, result, context=""): - assert self.SEARCH_URL + if not self.SEARCH_URL: + raise NotImplementedError("No SEARCH_URL defined.") for q, expected_result in result: search = {"search_vector": q} response = client.get(reverse(self.SEARCH_URL), search) -- cgit v1.2.3