Exemplo n.º 1
0
def test_output_message_with_success():
    with pytest.raises(SystemExit) as cm:
        output_message({'result': 'success', 'message': 'test success'})
    assert cm.value.code == 0
Exemplo n.º 2
0
def test_output_message_with_failed():
    with pytest.raises(SystemExit) as cm:
        output_message({'result': 'failed', 'message': 'test failed'})
    assert cm.value.code == 1
Exemplo n.º 3
0
def test_output_message_with_continue():
    assert output_message({'result': 'continue', 'message': 'test continue'})
Exemplo n.º 4
0
def test_output_message_with_success():
    with pytest.raises(SystemExit) as cm:
        output_message({'result': 'success', 'message': 'test success'})
    assert cm.value.code == 0
Exemplo n.º 5
0
def test_output_message_with_failed():
    with pytest.raises(SystemExit) as cm:
        output_message({'result': 'failed', 'message': 'test failed'})
    assert cm.value.code == 1
Exemplo n.º 6
0
def test_output_message_with_continue():
    assert output_message({'result': 'continue', 'message': 'test continue'})