Example #1
0
def test_generate_cert_generating_twice_throws_exception(saved_key, key_path):
    with pytest.raises(FileExistsError):
        sut.generate_cert(key_path)
Example #2
0
def test_generate_cert_with_replace_generates_different_key(
        saved_key, key_path):
    new_key = sut.generate_cert(key_path, replace=True)
    assert saved_key != new_key
Example #3
0
def saved_key(key_path):
    return sut.generate_cert(key_path)