MCPcopy
hub / github.com/apache/caldera / test_display_facts

Function test_display_facts

tests/api/v2/test_knowledge.py:65–79  ·  view source on GitHub ↗
(knowledge_webapp, aiohttp_client, fire_event_mock)

Source from the content-addressed store, hash-verified

63
64
65async def test_display_facts(knowledge_webapp, aiohttp_client, fire_event_mock):
66 client = await aiohttp_client(knowledge_webapp)
67 fact_data = {
68 'trait': 'demo',
69 'value': 'test'
70 }
71 await client.post('/facts', json=fact_data, headers=headers)
72 resp = await client.get('/facts', json=fact_data, headers=headers)
73 data = await resp.json()
74 response = data['found']
75
76 assert len(response) == 1
77 assert response[0]['trait'] == 'demo'
78 assert response[0]['value'] == 'test'
79 assert response[0]['source'] == WILDCARD_STRING
80
81
82async def test_display_operation_facts(knowledge_webapp, aiohttp_client, fire_event_mock):

Callers

nothing calls this directly

Calls 1

aiohttp_clientFunction · 0.85

Tested by

no test coverage detected