#6816·keep

[ Bug]: auth0 test fixture resolves a host named "https", erroring unit-tests on every PR

Author: chiruu12Created Sep 11, 2026Updated Sep 11, 2026

Describe the bug

unit-tests errors on every PR. Four tests in tests/test_auth.py never start:

ERROR at setup of test_api_key_with_header[MULTI_TENANT] - Failed: Timeout >20.0s
ERROR at setup of test_bearer_token[MULTI_TENANT] - Failed: Timeout >20.0s
ERROR at setup of test_webhook_api_key[MULTI_TENANT] - Failed: Timeout >20.0s
ERROR at setup of test_deleted_api_key_authentication[MULTI_TENANT] - Failed: Timeout >20.0s

with

socket.gaierror: [Errno -3] Temporary failure in name resolution
Failed to fetch OpenID discovery document from
  https://https://auth0domain.com/.well-known/openid-configuration

Two causes, both in tests/fixtures/client.py.

The MULTI_TENANT branch sets AUTH0_DOMAIN to https://auth0domain.com. Every other reader of that variable expects a bare host: auth0_utils formats it into "https://{}/api/v2/", the verifier builds self.issuer the same way, and tests/test_auth_new.py uses test-domain.auth0.com. With a scheme already on it the verifier asks the resolver for a host named https, which is the gaierror above.

The fixture also stubs OIDC discovery only for the dict form of the parameter. MULTI_TENANT loads the same Auth0 verifier with no stub, so the call goes out for real and burns the full 20 second timeout before the test body runs.

To Reproduce

  1. pytest tests/test_auth.py --non-integration on a runner without outbound DNS, or with auth0domain.com unresolvable
  2. The four MULTI_TENANT parametrisations error at setup

Expected behavior

The auth0 tests stub discovery and never leave the machine, the way tests/test_auth_new.py already does.

Additional context

Counting outbound DNS lookups during test_api_key_with_header[MULTI_TENANT] on current main gives ['https'], one lookup for a host that cannot exist.

A resolver that answers quickly hides this, so a local pass is not evidence either way. The lookup count is.

Fix is in #6783.