summaryrefslogtreecommitdiff
path: root/archaeological_context_records/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_context_records/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_context_records/tests.py')
-rw-r--r--archaeological_context_records/tests.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/archaeological_context_records/tests.py b/archaeological_context_records/tests.py
index 28aa2208b..7a0b41f50 100644
--- a/archaeological_context_records/tests.py
+++ b/archaeological_context_records/tests.py
@@ -261,11 +261,12 @@ class ContextRecordInit(OperationInitTest):
return self.create_context_record(force=force, user=user)[0]
def tearDown(self):
+ # nosec: quick and dirty cleanup do not care to catch exceptions
if hasattr(self, "context_records"):
for cr in self.context_records:
try:
cr.delete()
- except:
+ except: # nosec
pass
self.context_records = []
super(ContextRecordInit, self).tearDown()
@@ -955,7 +956,8 @@ class ContextRecordPermissionTest(ContextRecordInit, TestCase):
self.alt_user.user_permissions.add(
Permission.objects.get(codename="change_own_contextrecord")
)
- 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(