Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_get_user(self, user_passed, user_expected):
"""
check get_user method
:param user_passed:
:param user_expected:
:return:
"""
try:
user_id = user_passed.id
except AttributeError:
user_id = None
result = AuthBackend.get_user(user_id)
assert result == user_expected