@@ -373,15 +373,12 @@ def test_gateway_request_timeout_pad_option(
373
373
GatewayClient .clear_instance ()
374
374
375
375
376
- cookie_expire_time = format_datetime (datetime .now (tz = timezone .utc ) + timedelta (seconds = 180 ))
377
-
378
-
379
376
@pytest .mark .parametrize (
380
377
"accept_cookies,expire_arg,expire_param,existing_cookies,cookie_exists" ,
381
378
[
382
379
(False , None , None , "EXISTING=1" , False ),
383
380
(True , None , None , "EXISTING=1" , True ),
384
- (True , "Expires" , cookie_expire_time , None , True ),
381
+ (True , "Expires" , 180 , None , True ),
385
382
(True , "Max-Age" , "-360" , "EXISTING=1" , False ),
386
383
],
387
384
)
@@ -400,6 +397,10 @@ def test_gateway_request_with_expiring_cookies(
400
397
401
398
cookie : SimpleCookie = SimpleCookie ()
402
399
cookie .load ("SERVERID=1234567; Path=/" )
400
+ if expire_arg == "Expires" :
401
+ expire_param = format_datetime (
402
+ datetime .now (tz = timezone .utc ) + timedelta (seconds = expire_param )
403
+ )
403
404
if expire_arg :
404
405
cookie ["SERVERID" ][expire_arg ] = expire_param
405
406
0 commit comments