help_pages.tests.test_devices_help_viewsΒΆ

Test cases for devices help views.

ClassesΒΆ

BaseHelpViewTests

Test cases for BaseHelpView in devices app.

NoOnboardingCmpSharedSecretStrategyTests

Test cases for NoOnboardingCmpSharedSecretStrategy.

DeviceNoOnboardingCmpSharedSecretHelpViewTests

Test cases for DeviceNoOnboardingCmpSharedSecretHelpView.

NoOnboardingEstUsernamePasswordStrategyTests

Test cases for NoOnboardingEstUsernamePasswordStrategy.

DeviceNoOnboardingEstUsernamePasswordHelpViewTests

Test cases for DeviceNoOnboardingEstUsernamePasswordHelpView.

OnboardingDomainCredentialCmpSharedSecretStrategyTests

Test cases for OnboardingDomainCredentialCmpSharedSecretStrategy.

DeviceOnboardingDomainCredentialCmpSharedSecretHelpViewTests

Test cases for DeviceOnboardingDomainCredentialCmpSharedSecretHelpView.

OnboardingDomainCredentialEstUsernamePasswordStrategyTests

Test cases for OnboardingDomainCredentialEstUsernamePasswordStrategy.

DeviceOnboardingDomainCredentialEstUsernamePasswordHelpViewTests

Test cases for DeviceOnboardingDomainCredentialEstUsernamePasswordHelpView.

DeviceApplicationCertificateWithCmpDomainCredentialHelpViewTests

Test cases for DeviceApplicationCertificateWithCmpDomainCredentialHelpView.

DeviceApplicationCertificateWithEstDomainCredentialHelpViewTests

Test cases for DeviceApplicationCertificateWithEstDomainCredentialHelpView.

OpcUaGdsPushOnboardingStrategyTests

Test cases for OpcUaGdsPushOnboardingStrategy.

OpcUaGdsPushApplicationCertificateHelpViewTests

Test cases for OpcUaGdsPushApplicationCertificateHelpView.

OpcUaGdsPushOnboardingHelpViewTests

Test cases for OpcUaGdsPushOnboardingHelpView.

Module ContentsΒΆ

class help_pages.tests.test_devices_help_views.BaseHelpViewTests(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test cases for BaseHelpView in devices app.

setUp()[source]ΒΆ

Set up test fixtures.

Return type:

None

test_make_context_success(mock_get_ip, mock_filter)[source]ΒΆ

Test _make_context creates HelpContext successfully.

Parameters:
  • mock_get_ip (unittest.mock.Mock)

  • mock_filter (unittest.mock.Mock)

Return type:

None

test_make_context_no_domain()[source]ΒΆ

Test _make_context raises Http404 when domain is missing.

Return type:

None

test_make_context_no_public_key_info(mock_filter)[source]ΒΆ

Test _make_context raises Http404 when public_key_info is missing.

Parameters:

mock_filter (unittest.mock.Mock)

Return type:

None

test_get_context_data_success(mock_get_ip, mock_filter)[source]ΒΆ

Test get_context_data builds help page successfully.

Parameters:
  • mock_get_ip (unittest.mock.Mock)

  • mock_filter (unittest.mock.Mock)

Return type:

None

test_get_context_data_no_strategy()[source]ΒΆ

Test get_context_data raises RuntimeError when strategy is not configured.

Return type:

None

class help_pages.tests.test_devices_help_views.NoOnboardingCmpSharedSecretStrategyTests(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test cases for NoOnboardingCmpSharedSecretStrategy.

setUp()[source]ΒΆ

Set up test fixtures.

Return type:

None

test_build_sections_first_credential(mock_cmp_signer, mock_keygen, mock_profile)[source]ΒΆ

Test build_sections for first credential.

Parameters:
  • mock_cmp_signer (unittest.mock.Mock)

  • mock_keygen (unittest.mock.Mock)

  • mock_profile (unittest.mock.Mock)

Return type:

None

test_build_sections_no_onboarding_config()[source]ΒΆ

Test build_sections raises Http404 when no_onboarding_config is missing.

Return type:

None

class help_pages.tests.test_devices_help_views.DeviceNoOnboardingCmpSharedSecretHelpViewTests(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test cases for DeviceNoOnboardingCmpSharedSecretHelpView.

test_strategy_is_configured()[source]ΒΆ

Test that strategy is properly configured.

Return type:

None

class help_pages.tests.test_devices_help_views.NoOnboardingEstUsernamePasswordStrategyTests(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test cases for NoOnboardingEstUsernamePasswordStrategy.

setUp()[source]ΒΆ

Set up test fixtures.

Return type:

None

test_build_sections(mock_tls, mock_keygen, mock_profile)[source]ΒΆ

Test build_sections creates all required sections.

Parameters:
  • mock_tls (unittest.mock.Mock)

  • mock_keygen (unittest.mock.Mock)

  • mock_profile (unittest.mock.Mock)

Return type:

None

class help_pages.tests.test_devices_help_views.DeviceNoOnboardingEstUsernamePasswordHelpViewTests(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test cases for DeviceNoOnboardingEstUsernamePasswordHelpView.

test_strategy_is_configured()[source]ΒΆ

Test that strategy is properly configured.

Return type:

None

class help_pages.tests.test_devices_help_views.OnboardingDomainCredentialCmpSharedSecretStrategyTests(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test cases for OnboardingDomainCredentialCmpSharedSecretStrategy.

setUp()[source]ΒΆ

Set up test fixtures.

Return type:

None

test_build_sections(mock_keygen)[source]ΒΆ

Test build_sections creates all required sections.

Parameters:

mock_keygen (unittest.mock.Mock)

Return type:

None

test_build_sections_no_onboarding_config()[source]ΒΆ

Test build_sections raises Http404 when onboarding_config is missing.

Return type:

None

class help_pages.tests.test_devices_help_views.DeviceOnboardingDomainCredentialCmpSharedSecretHelpViewTests(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test cases for DeviceOnboardingDomainCredentialCmpSharedSecretHelpView.

test_strategy_is_configured()[source]ΒΆ

Test that strategy is properly configured.

Return type:

None

class help_pages.tests.test_devices_help_views.OnboardingDomainCredentialEstUsernamePasswordStrategyTests(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test cases for OnboardingDomainCredentialEstUsernamePasswordStrategy.

setUp()[source]ΒΆ

Set up test fixtures.

Return type:

None

test_build_sections(mock_tls, mock_keygen, mock_profile)[source]ΒΆ

Test build_sections creates all required sections.

Parameters:
  • mock_tls (unittest.mock.Mock)

  • mock_keygen (unittest.mock.Mock)

  • mock_profile (unittest.mock.Mock)

Return type:

None

class help_pages.tests.test_devices_help_views.DeviceOnboardingDomainCredentialEstUsernamePasswordHelpViewTests(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test cases for DeviceOnboardingDomainCredentialEstUsernamePasswordHelpView.

test_strategy_is_configured()[source]ΒΆ

Test that strategy is properly configured.

Return type:

None

class help_pages.tests.test_devices_help_views.DeviceApplicationCertificateWithCmpDomainCredentialHelpViewTests(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test cases for DeviceApplicationCertificateWithCmpDomainCredentialHelpView.

test_view_attributes()[source]ΒΆ

Test view has correct attributes.

Return type:

None

class help_pages.tests.test_devices_help_views.DeviceApplicationCertificateWithEstDomainCredentialHelpViewTests(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test cases for DeviceApplicationCertificateWithEstDomainCredentialHelpView.

test_view_attributes()[source]ΒΆ

Test view has correct attributes.

Return type:

None

class help_pages.tests.test_devices_help_views.OpcUaGdsPushOnboardingStrategyTests(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test cases for OpcUaGdsPushOnboardingStrategy.

setUp()[source]ΒΆ

Set up test fixtures.

Return type:

None

test_build_sections_with_domain_credential(mock_reverse, mock_filter)[source]ΒΆ

Test build_sections when device has domain credential.

Parameters:
  • mock_reverse (unittest.mock.Mock)

  • mock_filter (unittest.mock.Mock)

Return type:

None

test_build_sections_without_domain_credential(mock_reverse, mock_filter)[source]ΒΆ

Test build_sections when device does not have domain credential.

Parameters:
  • mock_reverse (unittest.mock.Mock)

  • mock_filter (unittest.mock.Mock)

Return type:

None

test_build_sections_no_onboarding_config()[source]ΒΆ

Test build_sections raises Http404 when onboarding_config is missing.

Return type:

None

test_build_ca_hierarchy_section_with_ca_and_crl(mock_x509, mock_reverse, mock_filter)[source]ΒΆ

Test _build_ca_hierarchy_section with CA and valid CRL.

Parameters:
  • mock_x509 (unittest.mock.Mock)

  • mock_reverse (unittest.mock.Mock)

  • mock_filter (unittest.mock.Mock)

Return type:

None

test_build_ca_hierarchy_section_missing_crl(mock_x509, mock_reverse, mock_filter)[source]ΒΆ

Test _build_ca_hierarchy_section with missing CRL.

Parameters:
  • mock_x509 (unittest.mock.Mock)

  • mock_reverse (unittest.mock.Mock)

  • mock_filter (unittest.mock.Mock)

Return type:

None

test_build_ca_hierarchy_section_no_ca()[source]ΒΆ

Test _build_ca_hierarchy_section when no CA is configured.

Return type:

None

test_build_download_section_with_ca(mock_reverse)[source]ΒΆ

Test _build_download_section when CA is configured.

Parameters:

mock_reverse (unittest.mock.Mock)

Return type:

None

test_build_download_section_no_ca()[source]ΒΆ

Test _build_download_section when no CA is configured.

Return type:

None

class help_pages.tests.test_devices_help_views.OpcUaGdsPushApplicationCertificateHelpViewTests(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test cases for OpcUaGdsPushApplicationCertificateHelpView.

test_strategy_is_configured()[source]ΒΆ

Test that strategy is properly configured.

Return type:

None

class help_pages.tests.test_devices_help_views.OpcUaGdsPushOnboardingHelpViewTests(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test cases for OpcUaGdsPushOnboardingHelpView.

test_strategy_is_configured()[source]ΒΆ

Test that strategy is properly configured.

Return type:

None