management.tests.test_views.test_pkcs11

Classes

PKCS11ConfigFormTestCase

Similar to TransactionTestCase, but use transaction.atomic() to achieve

Module Contents

class management.tests.test_views.test_pkcs11.PKCS11ConfigFormTestCase(methodName='runTest')[source]

Bases: django.test.TestCase

Similar to TransactionTestCase, but use transaction.atomic() to achieve test isolation.

In most situations, TestCase should be preferred to TransactionTestCase as it allows faster execution. However, there are some situations where using TransactionTestCase might be necessary (e.g. testing some transactional behavior).

On database backends with no transaction support, TestCase behaves as TransactionTestCase.

setUp()[source]

Set up test data and authenticate the test client.

test_form_valid_data()[source]

Test that the form is valid with valid data.

test_form_invalid_data()[source]

Test that the form is invalid with invalid data.

test_save_token_config(mock_get_or_create)[source]

Test that save_token_config saves the token configuration.

test_clean_sets_defaults_for_softhsm()[source]

Test that clean sets defaults for softhsm.