Exemple #1
0
def test_read_mylogin_cnf():
    """Tests that a login path file can be read and decrypted."""
    mylogin_cnf = open_mylogin_cnf(LOGIN_PATH_FILE)

    assert isinstance(mylogin_cnf, TextIOWrapper)

    contents = mylogin_cnf.read()
    for word in ('[test]', 'user', 'password', 'host', 'port'):
        assert word in contents
Exemple #2
0
def test_read_mylogin_cnf():
    """Tests that a login path file can be read and decrypted."""
    mylogin_cnf = open_mylogin_cnf(LOGIN_PATH_FILE)

    assert isinstance(mylogin_cnf, TextIOWrapper)

    contents = mylogin_cnf.read()
    for word in ('[test]', 'user', 'password', 'host', 'port'):
        assert word in contents
Exemple #3
0
def test_read_mylogin_cnf():
    """Tests that a login path file can be read and decrypted."""
    mylogin_cnf = open_mylogin_cnf(LOGIN_PATH_FILE)

    assert isinstance(mylogin_cnf, TextIOWrapper)

    contents = mylogin_cnf.read()
    for word in ("[test]", "user", "password", "host", "port"):
        assert word in contents
Exemple #4
0
def test_read_mylogin_cnf_without_crypto():
    with pytest.raises(CryptoError):
        mylogin_cnf = open_mylogin_cnf(LOGIN_PATH_FILE)
Exemple #5
0
def test_read_mylogin_cnf_without_crypto():
    with pytest.raises(CryptoError):
        mylogin_cnf = open_mylogin_cnf(LOGIN_PATH_FILE)