devices.tests.test_credential_download

Test cases for Remote Device Credential Download.

Functions

test_otp_generation(mock_models)

Test that a valid OTP is generated on save.

test_token_invalidation(mock_models)

Test that a download token is no longer valid after the token validity period.

test_otp_use_once(mock_models)

Test that an OTP can only be used once.

test_otp_max_attempts(mock_models)

Test that the OTP is invalidated after too many incorrect attempts.

Module Contents

devices.tests.test_credential_download.test_otp_generation(mock_models)[source]

Test that a valid OTP is generated on save.

Parameters:

mock_models (dict[str, Any])

Return type:

None

devices.tests.test_credential_download.test_token_invalidation(mock_models)[source]

Test that a download token is no longer valid after the token validity period.

Parameters:

mock_models (dict[str, Any])

Return type:

None

devices.tests.test_credential_download.test_otp_use_once(mock_models)[source]

Test that an OTP can only be used once.

Parameters:

mock_models (dict[str, Any])

Return type:

None

devices.tests.test_credential_download.test_otp_max_attempts(mock_models)[source]

Test that the OTP is invalidated after too many incorrect attempts.

Parameters:

mock_models (dict[str, Any])

Return type:

None