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) --- archaeological_context_records/tests.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'archaeological_context_records') 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( -- cgit v1.2.3