MCPcopy Create free account
hub / github.com/IBM/mcp-cli / test_csp_present

Method test_csp_present

tests/apps/test_host.py:86–99  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

84
85class TestExtractCsp:
86 def test_csp_present(self):
87 resource = {
88 "contents": [
89 {
90 "uri": "ui://test",
91 "text": "<html></html>",
92 "_meta": {
93 "ui": {"csp": {"connectDomains": ["https://api.example.com"]}}
94 },
95 }
96 ]
97 }
98 csp = AppHostServer._extract_csp(resource)
99 assert csp == {"connectDomains": ["https://api.example.com"]}
100
101 def test_csp_absent(self):
102 resource = {"contents": [{"uri": "ui://test", "text": "<html></html>"}]}

Callers

nothing calls this directly

Calls 1

_extract_cspMethod · 0.80

Tested by

no test coverage detected