Skip to content
Snippets Groups Projects
Commit 07492703 authored by David Barnes's avatar David Barnes Committed by Brandon Rodriguez
Browse files

Fix some pylint errors and ignore snake_case as assert methods will

never be in snake case.
parent ae85e916
Branches
Tags
No related merge requests found
...@@ -67,6 +67,7 @@ disable=arguments-differ, ...@@ -67,6 +67,7 @@ disable=arguments-differ,
broad-except, broad-except,
consider-using-f-string, consider-using-f-string,
duplicate-code, duplicate-code,
invalid-name,
no-else-raise, no-else-raise,
no-else-return, no-else-return,
signature-differs, signature-differs,
......
...@@ -147,7 +147,7 @@ class CoreTestCaseMixin(metaclass=DebugPrintMetaClass): ...@@ -147,7 +147,7 @@ class CoreTestCaseMixin(metaclass=DebugPrintMetaClass):
self._debug_print('') self._debug_print('')
# Raise original error. # Raise original error.
raise AssertionError(err) raise AssertionError(err) from err
# endregion Custom Assertions # endregion Custom Assertions
...@@ -214,8 +214,8 @@ class CoreTestCaseMixin(metaclass=DebugPrintMetaClass): ...@@ -214,8 +214,8 @@ class CoreTestCaseMixin(metaclass=DebugPrintMetaClass):
# Failed to get by codename. Attempt again with name. # Failed to get by codename. Attempt again with name.
try: try:
permission = Permission.objects.get(name=user_permission) permission = Permission.objects.get(name=user_permission)
except Permission.DoesNotExist: except Permission.DoesNotExist as pde:
raise ValueError('Failed to find permission of "{0}".'.format(user_permission)) raise ValueError('Failed to find permission of "{0}".'.format(user_permission)) from pde
# If we made it this far, then valid Permission was found. Apply to user. # If we made it this far, then valid Permission was found. Apply to user.
user = self.get_user(user) user = self.get_user(user)
...@@ -241,8 +241,8 @@ class CoreTestCaseMixin(metaclass=DebugPrintMetaClass): ...@@ -241,8 +241,8 @@ class CoreTestCaseMixin(metaclass=DebugPrintMetaClass):
user_group = str(user_group) user_group = str(user_group)
try: try:
group = Group.objects.get(name=user_group) group = Group.objects.get(name=user_group)
except Group.DoesNotExist: except Group.DoesNotExist as gde:
raise ValueError('Failed to find Group of "{0}".'.format(user_group)) raise ValueError('Failed to find Group of "{0}".'.format(user_group)) from gde
# If we made it this far, then valid Group was found. Apply to user. # If we made it this far, then valid Group was found. Apply to user.
user = self.get_user(user) user = self.get_user(user)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment