mirror of
https://github.com/Such-Software/adaptive-multi-protocol-gateway.git
synced 2026-12-01 04:13:53 +01:00
Add interaction policy to fixture manifests
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user