Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 4
0
def test_read_mylogin_cnf_without_crypto():
    with pytest.raises(CryptoError):
        mylogin_cnf = open_mylogin_cnf(LOGIN_PATH_FILE)
Ejemplo n.º 5
0
def test_read_mylogin_cnf_without_crypto():
    with pytest.raises(CryptoError):
        mylogin_cnf = open_mylogin_cnf(LOGIN_PATH_FILE)