Ejemplo n.º 1
0
def test_if_file_is_smaller_than_13_and_doesnt_exist_create():
    lil_id = '900111003299'
    with pytest.raises(SystemExit) as exit_num:
        add(lil_id)
    assert 0 == exit_num.value.code
Ejemplo n.º 2
0
def test_id_bigger_than_13():
    big_id = '1234567890123456'
    with pytest.raises(SystemExit) as exit_val:
        add(big_id)
    assert 2 == exit_val.value.code
Ejemplo n.º 3
0
def test_id_smaller_than_13_if_exists_or_not():
    lil_id = '9000003299'
    with pytest.raises(SystemExit) as exit_num:
        add(lil_id)
    assert 1 == exit_num.value.code