management.tests.test_commandsΒΆ
Test suite for Django management commands.
ClassesΒΆ
Test suite for compilemsg command. |
|
Test suite for makemsg command. |
|
Test suite for printversion command. |
|
Test suite for inittrustpoint command. |
|
Test suite for startup_manager command. |
|
Test suite for tls_cred command. |
|
Test suite for trustpointbackup command. |
|
Test suite for trustpointrestore command. |
|
Test suite for unwrap_dek command. |
|
Test suite for update_tls command. |
|
Test suite for managepy_override module. |
Module ContentsΒΆ
- class management.tests.test_commands.CompileMsgCommandTest(methodName='runTest')[source]ΒΆ
Bases:
django.test.TestCaseTest suite for compilemsg command.
- class management.tests.test_commands.MakeMsgCommandTest(methodName='runTest')[source]ΒΆ
Bases:
django.test.TestCaseTest suite for makemsg command.
- class management.tests.test_commands.PrintVersionCommandTest(methodName='runTest')[source]ΒΆ
Bases:
django.test.TestCaseTest suite for printversion command.
- class management.tests.test_commands.InitTrustpointCommandTest(methodName='runTest')[source]ΒΆ
Bases:
django.test.TestCaseTest suite for inittrustpoint command.
- test_inittrustpoint_with_migrations(mock_call_command, mock_open_file)[source]ΒΆ
Test inittrustpoint runs migrations by default.
- Parameters:
mock_call_command (unittest.mock.MagicMock)
mock_open_file (unittest.mock.MagicMock)
- Return type:
None
- test_inittrustpoint_without_migrations(mock_call_command, mock_open_file)[source]ΒΆ
Test inittrustpoint skips migrations with βnomigrations.
- Parameters:
mock_call_command (unittest.mock.MagicMock)
mock_open_file (unittest.mock.MagicMock)
- Return type:
None
- test_inittrustpoint_with_tls(mock_call_command, mock_open_file)[source]ΒΆ
Test inittrustpoint prepares TLS with βtls option.
- Parameters:
mock_call_command (unittest.mock.MagicMock)
mock_open_file (unittest.mock.MagicMock)
- Return type:
None
- class management.tests.test_commands.StartupManagerCommandTest(methodName='runTest')[source]ΒΆ
Bases:
django.test.TestCaseTest suite for startup_manager command.
- test_startup_manager_db_not_initialized(mock_builder, mock_selector)[source]ΒΆ
Test startup_manager when database is not initialized.
- Parameters:
mock_builder (unittest.mock.MagicMock)
mock_selector (unittest.mock.MagicMock)
- Return type:
None
- class management.tests.test_commands.TlsCredCommandTest(methodName='runTest')[source]ΒΆ
Bases:
django.test.TestCaseTest suite for tls_cred command.
- test_tls_cred_write_out(mock_chain_path, mock_cert_path, mock_key_path, mock_active, mock_credential, mock_generator_class)[source]ΒΆ
Test tls_cred command with βwrite_out option.
- Parameters:
mock_chain_path (unittest.mock.MagicMock)
mock_cert_path (unittest.mock.MagicMock)
mock_key_path (unittest.mock.MagicMock)
mock_active (unittest.mock.MagicMock)
mock_credential (unittest.mock.MagicMock)
mock_generator_class (unittest.mock.MagicMock)
- Return type:
None
- test_tls_cred_without_write_out(mock_active, mock_credential, mock_generator_class)[source]ΒΆ
Test tls_cred command without βwrite_out option.
- Parameters:
mock_active (unittest.mock.MagicMock)
mock_credential (unittest.mock.MagicMock)
mock_generator_class (unittest.mock.MagicMock)
- Return type:
None
- class management.tests.test_commands.TrustpointBackupCommandTest(methodName='runTest')[source]ΒΆ
Bases:
django.test.TestCaseTest suite for trustpointbackup command.
- class management.tests.test_commands.TrustpointRestoreCommandTest(methodName='runTest')[source]ΒΆ
Bases:
django.test.TestCaseTest suite for trustpointrestore command.
- test_trustpointrestore_without_filepath(mock_app_version, mock_active_tls, mock_call_command, mock_subprocess)[source]ΒΆ
Test trustpointrestore command without filepath option.
- Parameters:
mock_app_version (unittest.mock.MagicMock)
mock_active_tls (unittest.mock.MagicMock)
mock_call_command (unittest.mock.MagicMock)
mock_subprocess (unittest.mock.MagicMock)
- Return type:
None
- class management.tests.test_commands.UnwrapDekCommandTest(methodName='runTest')[source]ΒΆ
Bases:
django.test.TestCaseTest suite for unwrap_dek command.
- test_unwrap_dek_default_token()[source]ΒΆ
Test unwrap_dek command with default token label.
- Return type:
None
- class management.tests.test_commands.UpdateTlsCommandTest(methodName='runTest')[source]ΒΆ
Bases:
django.test.TestCaseTest suite for update_tls command.
- test_update_tls_success(mock_active_tls, mock_chain_path, mock_cert_path, mock_key_path, mock_path_class, mock_subprocess)[source]ΒΆ
Test update_tls command successful execution.
- Parameters:
mock_active_tls (unittest.mock.MagicMock)
mock_chain_path (unittest.mock.MagicMock)
mock_cert_path (unittest.mock.MagicMock)
mock_key_path (unittest.mock.MagicMock)
mock_path_class (unittest.mock.MagicMock)
mock_subprocess (unittest.mock.MagicMock)
- Return type:
None
- test_update_tls_no_credential(mock_active_tls)[source]ΒΆ
Test update_tls command when no active credential exists.
- Parameters:
mock_active_tls (unittest.mock.MagicMock)
- Return type:
None
- test_update_tls_script_failure(mock_active_tls, mock_chain_path, mock_cert_path, mock_key_path, mock_path_class, mock_subprocess)[source]ΒΆ
Test update_tls command when subprocess script fails.
- Parameters:
mock_active_tls (unittest.mock.MagicMock)
mock_chain_path (unittest.mock.MagicMock)
mock_cert_path (unittest.mock.MagicMock)
mock_key_path (unittest.mock.MagicMock)
mock_path_class (unittest.mock.MagicMock)
mock_subprocess (unittest.mock.MagicMock)
- Return type:
None
- class management.tests.test_commands.ManagePyOverrideTest(methodName='runTest')[source]ΒΆ
Bases:
django.test.TestCaseTest suite for managepy_override module.