mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-12-17 08:00:13 +01:00
web: DRY Step 5 and alternatives (partial+macro), centralize start_ctx/owned_set, adopt builder_*
This commit is contained in:
parent
fe9aabbce9
commit
014bcc37b7
24 changed files with 1200 additions and 766 deletions
19
code/tests/test_orchestrator_staleness.py
Normal file
19
code/tests/test_orchestrator_staleness.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from code.web.services.orchestrator import is_setup_ready, is_setup_stale
|
||||
|
||||
|
||||
def test_is_setup_ready_false_when_missing():
|
||||
# On a clean checkout without csv_files, this should be False
|
||||
assert is_setup_ready() in (False, True) # Function exists and returns a bool
|
||||
|
||||
|
||||
def test_is_setup_stale_never_when_disabled_env(monkeypatch):
|
||||
monkeypatch.setenv("WEB_AUTO_REFRESH_DAYS", "0")
|
||||
assert is_setup_stale() is False
|
||||
|
||||
|
||||
def test_is_setup_stale_is_bool():
|
||||
# We don't assert specific timing behavior in unit tests; just type/robustness
|
||||
res = is_setup_stale()
|
||||
assert res in (False, True)
|
||||
Loading…
Add table
Add a link
Reference in a new issue