Skip to content

Fix ALPN empty-string normalization mismatch in tests.test_security_compat_utils #21

Description

@MichaelDecent

Summary

tests.test_security_compat_utils has a failing ALPN normalization assertion in test_alpn_and_policy.

Reproduction

uv run python -m unittest -v tests.test_security_compat_utils

Current result

  • Ran: 3 tests
  • Failures: 1
  • Failing test:
    • test_alpn_and_policy

Failure details

At:

  • tests/test_security_compat_utils.py:17

Assertion:

self.assertIsNone(normalize_alpn(''))

Observed:

  • normalize_alpn('') returns ''
  • failure: AssertionError: '' is not None

Expected behavior

Clarify and align either:

  1. implementation: empty ALPN normalizes to None, or
  2. test expectation: empty ALPN normalizes to empty string.

Acceptance criteria

  • Behavior contract for empty ALPN input is explicit.
  • uv run python -m unittest -v tests.test_security_compat_utils passes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions