devices.tests.test_model_delete

Test cases for Trustpoint model deletion.

Functions

test_device_delete_revocation(mock_models)

Tests that credentials issued to a device are deleted and certificates revoked on device deletion.

test_multi_device_delete(mock_models)

Tests that multiple devices can be deleted and pre_delete is called even on a QuerySet of DeviceModels.

test_domain_delete(mock_models)

Tests that a domain can be deleted only if it has no associated devices.

test_ca_delete_with_issued_certificates(mock_models)

Tests that a CA can be deleted only if it has no associated domains and no issued unexpired certificates.

Module Contents

devices.tests.test_model_delete.test_device_delete_revocation(mock_models)[source]

Tests that credentials issued to a device are deleted and certificates revoked on device deletion.

Parameters:

mock_models (dict[str, Any])

Return type:

None

devices.tests.test_model_delete.test_multi_device_delete(mock_models)[source]

Tests that multiple devices can be deleted and pre_delete is called even on a QuerySet of DeviceModels.

Parameters:

mock_models (dict[str, Any])

Return type:

None

devices.tests.test_model_delete.test_domain_delete(mock_models)[source]

Tests that a domain can be deleted only if it has no associated devices.

Parameters:

mock_models (dict[str, Any])

Return type:

None

devices.tests.test_model_delete.test_ca_delete_with_issued_certificates(mock_models)[source]

Tests that a CA can be deleted only if it has no associated domains and no issued unexpired certificates.

Parameters:

mock_models (dict[str, Any])

Return type:

None