Example #1
0
def test_multi_cookie(
        request,
        i: int = Cookie(...),
        s: str = Cookie("a-str"),
        data: TestData4 = Cookie(...),
        nested_data: TestData = Cookie(..., alias="nested-data"),
):
    """Testing w/ Cookies requires setting the cookies by hand in the browser inspector"""
    return dict(s=s, i=i, data=data, nested_data=nested_data)
Example #2
0
def cookies2(request, wpn: str = Cookie(..., alias="weapon")):
    return wpn
Example #3
0
def cookies1(request, weapon: str = Cookie(...)):
    return weapon