request.tests.test_profile_validator

Tests for request/profile_validator.py.

Classes

TestProfileValidator

Tests for ProfileValidator class.

Module Contents

class request.tests.test_profile_validator.TestProfileValidator[source]

Tests for ProfileValidator class.

test_validate_success(domain_instance)[source]

Test successful profile validation.

Parameters:

domain_instance (dict[str, Any])

Return type:

None

test_validate_no_profile_model()[source]

Test validation fails when no profile model is set.

Return type:

None

test_validate_invalid_profile_json(domain_instance)[source]

Test validation fails with invalid profile JSON.

Parameters:

domain_instance (dict[str, Any])

Return type:

None

test_validate_profile_validation_error(domain_instance)[source]

Test validation fails when CSR doesn’t match profile.

Parameters:

domain_instance (dict[str, Any])

Return type:

None

test_validate_with_pydantic_validation_error(domain_instance)[source]

Test validation handles pydantic ValidationError.

Parameters:

domain_instance (dict[str, Any])

Return type:

None

test_validate_with_profile_validation_error_exception(domain_instance)[source]

Test validation handles ProfileValidationError exception.

Parameters:

domain_instance (dict[str, Any])

Return type:

None

test_validate_logging(domain_instance, caplog)[source]

Test that validation logs certificate request JSON.

Parameters:
  • domain_instance (dict[str, Any])

  • caplog (pytest.LogCaptureFixture)

Return type:

None