summaryrefslogtreecommitdiff
path: root/ishtar_common/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'ishtar_common/tests.py')
-rw-r--r--ishtar_common/tests.py6
1 files changed, 4 insertions, 2 deletions
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)