diff options
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 |
commit | 367059ddef14a495e277f68ceaf3455c092f839d (patch) | |
tree | ae625ff0265fecd122946c71d3a2d6afefae4817 /archaeological_context_records/tests.py | |
parent | ff5aee7158bd46e4ae22bc431adadd7060a6e277 (diff) | |
download | Ishtar-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.py | 6 |
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( |