Exemple #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
Exemple #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
Exemple #3
0
def test_output_message_with_continue():
    assert output_message({'result': 'continue', 'message': 'test continue'})
Exemple #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
Exemple #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
Exemple #6
0
def test_output_message_with_continue():
    assert output_message({'result': 'continue', 'message': 'test continue'})