management.tests.test_models.test_pkcs11tokenΒΆ
Tests for PKCS11Token model methods.
ClassesΒΆ
Similar to TransactionTestCase, but use transaction.atomic() to achieve |
Module ContentsΒΆ
- class management.tests.test_models.test_pkcs11token.PKCS11TokenTestCase(methodName='runTest')[source]ΒΆ
Bases:
django.test.TestCaseSimilar 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.
- test_get_dek_cache_miss(mock_pkcs11_lib, mock_get_pin)[source]ΒΆ
Test retrieving DEK when cache is empty.
- test_get_pin_from_file(mock_open, mock_access, mock_exists)[source]ΒΆ
Test retrieving PIN from a file.