setup_wizard.tests.test_views.test_utility_functions

Tests for utility functions in setup_wizard views.

Classes

TrustpointWizardErrorTests

Test cases for TrustpointWizardError exception.

TrustpointTlsServerCredentialErrorTests

Test cases for TrustpointTlsServerCredentialError exception.

ExecuteShellScriptTests

Test cases for execute_shell_script function.

Module Contents

class setup_wizard.tests.test_views.test_utility_functions.TrustpointWizardErrorTests(methodName='runTest')[source]

Bases: django.test.TestCase

Test cases for TrustpointWizardError exception.

test_exception_can_be_raised()[source]

Test that TrustpointWizardError can be raised.

Return type:

None

test_exception_with_custom_message()[source]

Test TrustpointWizardError with custom message.

Return type:

None

class setup_wizard.tests.test_views.test_utility_functions.TrustpointTlsServerCredentialErrorTests(methodName='runTest')[source]

Bases: django.test.TestCase

Test cases for TrustpointTlsServerCredentialError exception.

test_exception_default_message()[source]

Test default error message.

Return type:

None

test_exception_custom_message()[source]

Test custom error message.

Return type:

None

class setup_wizard.tests.test_views.test_utility_functions.ExecuteShellScriptTests(methodName='runTest')[source]

Bases: django.test.TestCase

Test cases for execute_shell_script function.

test_execute_script_success(mock_run)[source]

Test successful script execution.

Parameters:

mock_run (unittest.mock.Mock)

Return type:

None

test_execute_script_with_arguments(mock_run)[source]

Test script execution with arguments.

Parameters:

mock_run (unittest.mock.Mock)

Return type:

None

test_execute_script_not_found()[source]

Test error when script doesn’t exist.

Return type:

None

test_execute_script_not_a_file()[source]

Test error when path is not a file.

Return type:

None

test_execute_script_failure(mock_run)[source]

Test handling of script execution failure.

Parameters:

mock_run (unittest.mock.Mock)

Return type:

None