mirror of
https://github.com/mwisnowski/mtg_python_deckbuilder.git
synced 2025-12-17 08:00:13 +01:00
feat(preview): sampling, metrics, governance, server mana data
Preview endpoint + fast caches; curated pins + role quotas + rarity/overlap tuning; catalog+preview metrics; governance enforcement flags; server mana/color identity fields; docs/tests/scripts updated.
This commit is contained in:
parent
8f47dfbb81
commit
c4a7fc48ea
40 changed files with 6092 additions and 17312 deletions
17
code/tests/test_preview_suppress_curated_flag.py
Normal file
17
code/tests/test_preview_suppress_curated_flag.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
from fastapi.testclient import TestClient
|
||||
from code.web.app import app # type: ignore
|
||||
|
||||
|
||||
def test_preview_fragment_suppress_curated_removes_examples():
|
||||
client = TestClient(app)
|
||||
# Get HTML fragment with suppress_curated
|
||||
r = client.get('/themes/fragment/preview/aggro?suppress_curated=1&limit=14')
|
||||
assert r.status_code == 200
|
||||
html = r.text
|
||||
# Should not contain group label Curated Examples
|
||||
assert 'Curated Examples' not in html
|
||||
# Should still contain payoff/enabler group labels
|
||||
assert 'Payoffs' in html or 'Enablers & Support' in html
|
||||
# No example role chips: role-example occurrences removed
|
||||
# Ensure no rendered span with curated example role (avoid style block false positive)
|
||||
assert '<span class="mini-badge role-example"' not in html
|
||||
Loading…
Add table
Add a link
Reference in a new issue