help_pages.tests.test_baseΒΆ

Test cases for help_pages base module.

ClassesΒΆ

HelpPageStrategyTests

Test cases for HelpPageStrategy abstract base class.

HelpContextTests

Test cases for HelpContext dataclass.

BuildKeygenSectionTests

Test cases for build_keygen_section function.

BuildProfileSelectSectionTests

Test cases for build_profile_select_section function.

BuildTlsTrustStoreSectionTests

Test cases for build_tls_trust_store_section function.

BuildCmpSignerTrustStoreSectionTests

Test cases for build_cmp_signer_trust_store_section function.

BuildIssuingCaCertSectionTests

Test cases for build_issuing_ca_cert_section function.

BuildExtractFilesFromP12SectionTests

Test cases for build_extract_files_from_p12_section function.

Module ContentsΒΆ

class help_pages.tests.test_base.HelpPageStrategyTests(methodName='runTest')[source]ΒΆ

Bases: django.test.SimpleTestCase

Test cases for HelpPageStrategy abstract base class.

test_cannot_instantiate_abstract_class()[source]ΒΆ

Test that HelpPageStrategy cannot be instantiated directly.

Return type:

None

test_must_implement_build_sections()[source]ΒΆ

Test that subclasses must implement build_sections.

Return type:

None

class help_pages.tests.test_base.HelpContextTests(methodName='runTest')[source]ΒΆ

Bases: django.test.SimpleTestCase

Test cases for HelpContext dataclass.

setUp()[source]ΒΆ

Set up test fixtures.

Return type:

None

test_help_context_creation()[source]ΒΆ

Test creating a HelpContext.

Return type:

None

test_get_device_or_http_404_with_device()[source]ΒΆ

Test get_device_or_http_404 returns device when present.

Return type:

None

test_get_device_or_http_404_without_device()[source]ΒΆ

Test get_device_or_http_404 raises Http404 when device is None.

Return type:

None

test_get_devid_registration_or_http_404_with_registration()[source]ΒΆ

Test get_devid_registration_or_http_404 returns registration when present.

Return type:

None

test_get_devid_registration_or_http_404_without_registration()[source]ΒΆ

Test get_devid_registration_or_http_404 raises Http404 when registration is None.

Return type:

None

test_help_context_is_frozen()[source]ΒΆ

Test that HelpContext is immutable.

Return type:

None

class help_pages.tests.test_base.BuildKeygenSectionTests(methodName='runTest')[source]ΒΆ

Bases: django.test.SimpleTestCase

Test cases for build_keygen_section function.

test_build_keygen_section_rsa()[source]ΒΆ

Test building keygen section for RSA.

Return type:

None

class help_pages.tests.test_base.BuildProfileSelectSectionTests(methodName='runTest')[source]ΒΆ

Bases: django.test.SimpleTestCase

Test cases for build_profile_select_section function.

test_build_profile_select_section_with_profiles()[source]ΒΆ

Test building profile select section with profiles.

Return type:

None

test_build_profile_select_section_without_profiles()[source]ΒΆ

Test building profile select section without profiles.

Return type:

None

class help_pages.tests.test_base.BuildTlsTrustStoreSectionTests(methodName='runTest')[source]ΒΆ

Bases: django.test.TestCase

Test cases for build_tls_trust_store_section function.

test_build_tls_trust_store_section_success(mock_reverse, mock_first)[source]ΒΆ

Test building TLS trust store section successfully.

Parameters:
  • mock_reverse (unittest.mock.Mock)

  • mock_first (unittest.mock.Mock)

Return type:

None

test_build_tls_trust_store_section_no_tls(mock_first)[source]ΒΆ

Test building TLS trust store section when TLS is unavailable.

Parameters:

mock_first (unittest.mock.Mock)

Return type:

None

test_build_tls_trust_store_section_no_root(mock_first)[source]ΒΆ

Test building TLS trust store section when root CA is missing.

Parameters:

mock_first (unittest.mock.Mock)

Return type:

None

class help_pages.tests.test_base.BuildCmpSignerTrustStoreSectionTests(methodName='runTest')[source]ΒΆ

Bases: django.test.SimpleTestCase

Test cases for build_cmp_signer_trust_store_section function.

test_build_cmp_signer_trust_store_section_success(mock_reverse)[source]ΒΆ

Test building CMP signer trust store section successfully.

Parameters:

mock_reverse (unittest.mock.Mock)

Return type:

None

test_build_cmp_signer_trust_store_section_no_issuing_ca()[source]ΒΆ

Test building CMP signer trust store section without issuing CA.

Return type:

None

test_build_cmp_signer_trust_store_section_no_root()[source]ΒΆ

Test building CMP signer trust store section without root CA.

Return type:

None

class help_pages.tests.test_base.BuildIssuingCaCertSectionTests(methodName='runTest')[source]ΒΆ

Bases: django.test.SimpleTestCase

Test cases for build_issuing_ca_cert_section function.

test_build_issuing_ca_cert_section_success(mock_reverse)[source]ΒΆ

Test building issuing CA cert section successfully.

Parameters:

mock_reverse (unittest.mock.Mock)

Return type:

None

test_build_issuing_ca_cert_section_no_issuing_ca()[source]ΒΆ

Test building issuing CA cert section without issuing CA.

Return type:

None

class help_pages.tests.test_base.BuildExtractFilesFromP12SectionTests(methodName='runTest')[source]ΒΆ

Bases: django.test.SimpleTestCase

Test cases for build_extract_files_from_p12_section function.

test_build_extract_files_from_p12_section()[source]ΒΆ

Test building extract files from P12 section.

Return type:

None