

def test_verify_no_action(self):
    token = xsrf.XSRFToken('user@example.com', 'secret', current_time=1354160000)
    token_string = token.generate_token_string()
    token.verify_token_string(token_string)
    self.assertRaises(xsrf.XSRFTokenInvalid, token.verify_token_string, xsrf.XSRFToken('user@example.com', 'differentsecret', current_time=1354160000).generate_token_string())
    self.assertRaises(xsrf.XSRFTokenInvalid, token.verify_token_string, xsrf.XSRFToken('user@example.com', 'secret', current_time=1354160000).generate_token_string('action'))

dataset/ETHPy150Open Workiva/furious/furious/tests/extras/test_xsrf.py TestXSRFToken.test_verify_no_action/original