def test_csrf_token(): assert ( csrf_token(pretend.stub(_csrf=True, _session={"user.csrf": "123456"})) == "<input type=hidden name=csrf_token value=\"123456\">" )
def test_csrf_token(): assert (csrf_token( pretend.stub(_csrf=True, _session={ "user.csrf": "123456" })) == "<input type=hidden name=csrf_token value=\"123456\">")
def test_csrf_token_no_csrf(request): with pytest.raises(ValueError): csrf_token(request)