()
| 13 | |
| 14 | @pytest.fixture |
| 15 | def 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 |