示例#1
0
def test_parse_events(good_events):
    events = [
        Dep(parent="service1", parent_action="run", child="config1", child_action="run", state="success"),
        React(parent="config1", parent_action="run", child="service1", child_action="apply_config", state="success"),
    ]
    parsed = vr.parse_events(good_events)
    assert events == parsed
def test_parse_events(good_events):
    events =[Dep(parent='service1', parent_action='run',
                 child='config1', child_action='run',
                 state='success'),
             React(parent='config1', parent_action='run',
                   child='service1', child_action='apply_config',
                   state='success')]
    parsed = vr.parse_events(good_events)
    assert events == parsed
示例#3
0
def test_parse_events(good_events):
    events =[Dep(parent='service1', parent_action='run',
                 child='config1', child_action='run',
                 state='success'),
             React(parent='config1', parent_action='run',
                   child='service1', child_action='apply_config',
                   state='success')]
    parsed = vr.parse_events(good_events)
    assert events == parsed
def test_parse_bad_event(bad_event_type):
    with pytest.raises(Exception) as execinfo:
        vr.parse_events(bad_event_type)
    error = 'Invalid event type: skip'
    assert error == str(execinfo.value)
示例#5
0
def test_parse_bad_event(bad_event_type):
    with pytest.raises(Exception) as execinfo:
        vr.parse_events(bad_event_type)
    error = 'Invalid event type: skip'
    assert error == str(execinfo.value)