mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-03 06:40:31 +00:00
Several tests in test_network.py and test_network_integration.py had grown into near-copies of each other, differing only in the URL or host they fed the guard while asserting the same thing. That made the suite noisier to read and to extend than the behaviour it covers warrants. Merge the invalid-host rejection tests into one parametrized test over all seven unusual host forms, and likewise for their allow_internal counterparts that assert nothing is rejected. Merge the resolve_public_addresses tests that only check the host reaches the resolver unchanged, and the ones that check a private answer blocks regardless of how the host was spelled, keeping the stricter resolver call assertion on both merged cases. Add localhost as a fourth case to the numeric-host-forms test in the transport integration tests, so the name and the non-canonical numeric spellings of loopback are covered by one test. No behaviour or assertion strength changes; this only reduces duplicated test bodies while keeping every original case addressable by its own parametrize id. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>