Fix ALPN empty-string normalization mismatch in tests.test_security_compat_utils

Open
#21 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python

Research direction

Read tests/test_security_compat_utils.py, especially test_alpn_and_policy, and locate the normalize_alpn implementation. Run uv run python -m unittest -v tests.test_security_compat_utils to reproduce the mismatch. Decide and make explicit whether empty ALPN input should normalize to None or remain an empty string, then confirm the test reflects that contract and passes.

Written by the indexing model from the issue text.

Description

good first issue

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.
Dominant language
Python
Stars
3
Forks
3
Avg merge
7h 59m
Merged PRs (30d)
8

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tigrbl/tigrcorn

All issues in tigrbl/tigrcorn

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.