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

Function new_source_payload

tests/api/v2/handlers/test_sources_api.py:15–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13
14@pytest.fixture
15def new_source_payload():
16 fact = {
17 'trait': 'test_fact',
18 'value': 1
19 }
20 rule = Rule(action=RuleAction.ALLOW, trait="test_rule")
21 relationship = {
22 'source': fact,
23 'edge': 'alpha',
24 'origin': "new_test_operation"
25 }
26 source = {
27 'id': '456',
28 'name': 'new test source',
29 'facts': [fact],
30 'rules': [rule.schema.dump(rule)],
31 'relationships': [relationship],
32 'plugin': ''
33 }
34 return source
35
36
37@pytest.fixture

Callers

nothing calls this directly

Calls 1

RuleClass · 0.90

Tested by

no test coverage detected