diff --git a/src/strategy_crypto/tests/test_imports.py b/src/strategy_crypto/tests/test_imports.py index c606949..83e7a31 100644 --- a/src/strategy_crypto/tests/test_imports.py +++ b/src/strategy_crypto/tests/test_imports.py @@ -34,8 +34,10 @@ def test_frontend_imports() -> None: def test_strategies_json_loadable() -> None: files = importlib.resources.files("strategy_crypto") / "strategies" found = sorted(p.name for p in files.iterdir() if p.name.endswith(".json")) - assert "btc_fb63e851.json" in found - assert "eth_facd6af85d5d.json" in found + # Convenzione: almeno un winner BTC e uno ETH shippati col package. + # Non hard-codare hash specifici: cambiano ad ogni swap di paper winner. + assert any(n.startswith("btc_") for n in found), f"no btc_*.json in {found}" + assert any(n.startswith("eth_") for n in found), f"no eth_*.json in {found}" for fname in found: data = json.loads((files / fname).read_text()) assert "rules" in data, f"{fname} missing 'rules' key"