コード例 #1
0
ファイル: test_authenticate.py プロジェクト: kozze89/monary
def test_bad_authenticate():
    with get_monary_connection() as monary:
        success = monary.authenticate("monary_test", "monary_test_user", "monary_test_wrong_pass")
        assert not success, "authentication should not have succeeded with wrong password"
コード例 #2
0
ファイル: test_authenticate.py プロジェクト: kozze89/monary
def test_with_authenticate():
    with get_monary_connection() as monary:
        success = monary.authenticate("monary_test", "monary_test_user", "monary_test_pass")
        assert success, "authentication failed"
        [ col ] = monary.query("monary_test", "junk", {}, ["route"], ["int32"])
        assert col[0] == 66, "test value could not be retrieved"