Add interaction policy to fixture manifests

This commit is contained in:
jwinterm
2026-07-06 03:27:48 -04:00
parent 49054f729b
commit 5bfdd65dbc
3 changed files with 85 additions and 0 deletions
+11
View File
@@ -72,6 +72,7 @@ def _fixture_entry(site: SiteConfig, protocol: ProtocolConfig) -> dict[str, Any]
"transport": transport,
"profile": transport,
},
"interaction": _interaction_policy(protocol),
}
@@ -81,6 +82,16 @@ def _transport_for(protocol_name: str) -> str:
return protocol_name
def _interaction_policy(protocol: ProtocolConfig) -> dict[str, Any]:
return {
"tier": str(protocol.options.get("tier", protocol.options.get("max_tier", "static"))),
"identity": str(protocol.options.get("identity", "none")),
"payments": str(protocol.options.get("payments", "none")),
"realtime": bool(protocol.options.get("realtime", False)),
"public_allowed": bool(protocol.options.get("public_allowed", True)),
}
def _fixture_url(site: SiteConfig, protocol: ProtocolConfig) -> tuple[str, str]:
configured_url = protocol.options.get("fixture_url") or protocol.options.get("browser_url")
if configured_url: