Example #1
0
def test_parse_auth_cookie_allow_current(current_cookie, with_user,
                                         session_id):
    assert login._parse_auth_cookie(current_cookie) == (
        UserId(with_user[0]), session_id,
        login._generate_auth_hash(with_user[0], session_id))
Example #2
0
def test_parse_auth_cookie_refuse_pre_20(pre_20_cookie):
    with pytest.raises(MKAuthException, match="Refusing pre 2.0"):
        login._parse_auth_cookie(pre_20_cookie)