scipost.tests.test_totp module

class scipost.tests.test_totp.TOTPVerificationTest(methodName='runTest')[source]

Bases: django.test.testcases.TestCase

Test the scipost.totp.TOTPVerification util.

valid_secret_key = 'XTNHYG5OJPQ7ZRDC'
valid_token = '451977'
setUp()[source]

Hook method for setting up the test fixture before exercising it.

classmethod setUpTestData()[source]

Load initial data for the TestCase.

test_proper_return_classmethod()[source]

Test if valid secret_key/time/token combinations return True.

test_2fa_workaround_closed()[source]

Test if the admin login form is disabled. It’s an easy workaround for 2FA.

test_proper_login_procedure()[source]

Test if CBV fails gently if not used properly.