summaryrefslogtreecommitdiff
path: root/archaeological_finds/tests.py
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2023-04-11 12:27:23 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2023-04-17 15:47:16 +0200
commit367059ddef14a495e277f68ceaf3455c092f839d (patch)
treeae625ff0265fecd122946c71d3a2d6afefae4817 /archaeological_finds/tests.py
parentff5aee7158bd46e4ae22bc431adadd7060a6e277 (diff)
downloadIshtar-367059ddef14a495e277f68ceaf3455c092f839d.tar.bz2
Ishtar-367059ddef14a495e277f68ceaf3455c092f839d.zip
bandit checker: mark false security issues - fix security issues (low severity)
Diffstat (limited to 'archaeological_finds/tests.py')
-rw-r--r--archaeological_finds/tests.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/archaeological_finds/tests.py b/archaeological_finds/tests.py
index 1a62dce4b..467c7d1e1 100644
--- a/archaeological_finds/tests.py
+++ b/archaeological_finds/tests.py
@@ -145,18 +145,19 @@ class FindInit(ContextRecordInit):
def tearDown(self):
super(FindInit, self).tearDown()
+ # nosec: quick and dirty cleanup do not care to catch exceptions
if hasattr(self, "finds"):
for f in self.finds:
try:
f.delete()
- except:
+ except: # nosec
pass
self.finds = []
if hasattr(self, "base_finds"):
for f in self.base_finds:
try:
f.delete()
- except:
+ except: # nosec
pass
self.base_find = []
@@ -1700,7 +1701,8 @@ class FindPermissionTest(FindInit, TestCase):
self.alt_user.user_permissions.add(
Permission.objects.get(codename="change_own_find", content_type=ct_find)
)
- self.alt_username2, self.alt_password2, self.alt_user2 = create_user(
+ # nosec: hard coded password for test purposes
+ self.alt_username2, self.alt_password2, self.alt_user2 = create_user( # nosec
username="luke", password="iamyourfather"
)
profile = UserProfile.objects.create(