aeat.core._config_live_tests module

Strict live-test opt-in constants and predicates.

This module centralises the pytest-only live-read flags consumed by Settings, re-exported by core.config, and enforced by require_live_read(). The same predicate backs the generic test helper in aeat-tests.live_gate, so ordinary live tests, Google live tests, and access-gate diagnostics all agree that the only opt-in token is the literal string "1".

LIVE_READ_TEST_OPT_IN_SETTINGS_FIELD

Settings field backing the pytest-only live-read opt-in on Settings.

LIVE_READ_TEST_OPT_IN_ENV_VAR

Environment variable backing Settings.aeat_live_tests_enabled.

LIVE_READ_TEST_OPT_IN_VALUE

The only literal value that opts in to live tests.

LIVE_READ_TEST_GOOGLE_OPT_IN_SETTINGS_FIELD

Settings field backing the pytest-only Google live-test opt-in on Settings.

LIVE_READ_TEST_GOOGLE_OPT_IN_ENV_VAR

Environment variable backing Settings.aeat_live_tests_google.

strict_live_test_opt_in(value)[source]

Return whether value is the sole accepted live-test opt-in token.

Settings uses this for both live_tests_enabled and live_tests_google_enabled so neither field accepts truthy alternatives such as "true", "yes", or "on".

Return type:

bool

Parameters:

value (str)