Ejemplo n.º 1
0
def test_parse_input_cannot_deduct(files):
    with pytest.raises(SystemExit):
        input_file, output_file = decrypt._parse_arguments("file1")
Ejemplo n.º 2
0
def test_parse_ok(files):
    input_file, output_file = decrypt._parse_arguments("file1", "newfile")
    assert input_file == "file1"
    assert output_file == "newfile"
Ejemplo n.º 3
0
def test_parse_input_dir(files):
    with pytest.raises(SystemExit):
        input_file, output_file = decrypt._parse_arguments("dir2/", "asdf")
Ejemplo n.º 4
0
def test_parse_output_not_specified(files):
    encrypt.run("file1", "new.gpg")
    input_file, output_file = decrypt._parse_arguments("new.gpg")
    assert output_file == "new"
Ejemplo n.º 5
0
def test_parse_output_exists(files):
    with pytest.raises(SystemExit):
        decrypt._parse_arguments("file1", "file2")
Ejemplo n.º 6
0
def test_parse_empty_args(files):
    with pytest.raises(SystemExit):
        decrypt._parse_arguments("", "")
Ejemplo n.º 7
0
def test_parse_input_not_exists(files):
    with pytest.raises(SystemExit):
        decrypt._parse_arguments("asdf.gpg")