Skip to content

Commit 11cb58a

Browse files
authored
Make tests pass after year 2027 (#12088)
1 parent aa2a195 commit 11cb58a

3 files changed

Lines changed: 12 additions & 11 deletions

File tree

CHANGES/12088.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed tests to pass when run after 2027-05-31 -- by :user:`bmwiedemann`.

tests/test_client_functional.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5450,30 +5450,30 @@ async def handler(request: web.Request) -> web.Response:
54505450
# Simulate Amazon-like cookies from the issue
54515451
cookies = [
54525452
"session-id=146-7423990-7621939; Domain=.amazon.it; "
5453-
"Expires=Mon, 31-May-2027 10:00:00 GMT; Path=/; "
5453+
"Expires=Mon, 31-May-3024 10:00:00 GMT; Path=/; "
54545454
"Secure; HttpOnly",
54555455
"session-id=147-8529641-8642103; Domain=.www.amazon.it; "
5456-
"Expires=Mon, 31-May-2027 10:00:00 GMT; Path=/; HttpOnly",
5456+
"Expires=Mon, 31-May-3024 10:00:00 GMT; Path=/; HttpOnly",
54575457
"session-id-time=2082758401l; Domain=.amazon.it; "
5458-
"Expires=Mon, 31-May-2027 10:00:00 GMT; Path=/; Secure",
5458+
"Expires=Mon, 31-May-3024 10:00:00 GMT; Path=/; Secure",
54595459
"session-id-time=2082758402l; Domain=.www.amazon.it; "
5460-
"Expires=Mon, 31-May-2027 10:00:00 GMT; Path=/",
5460+
"Expires=Mon, 31-May-3024 10:00:00 GMT; Path=/",
54615461
"ubid-acbit=257-7531983-5395266; Domain=.amazon.it; "
5462-
"Expires=Mon, 31-May-2027 10:00:00 GMT; Path=/; Secure",
5462+
"Expires=Mon, 31-May-3024 10:00:00 GMT; Path=/; Secure",
54635463
'x-acbit="KdvJzu8W@Fx6Jj3EuNFLuP0N7OtkuCfs"; Version=1; '
54645464
"Domain=.amazon.it; Path=/; Secure; HttpOnly",
54655465
"at-acbit=Atza|IwEBIM-gLr8; Domain=.amazon.it; "
5466-
"Expires=Mon, 31-May-2027 10:00:00 GMT; Path=/; "
5466+
"Expires=Mon, 31-May-3024 10:00:00 GMT; Path=/; "
54675467
"Secure; HttpOnly",
54685468
'sess-at-acbit="4+6VzSJPHIFD/OqO264hFxIng8Y="; '
5469-
"Domain=.amazon.it; Expires=Mon, 31-May-2027 10:00:00 GMT; "
5469+
"Domain=.amazon.it; Expires=Mon, 31-May-3024 10:00:00 GMT; "
54705470
"Path=/; Secure; HttpOnly",
54715471
"lc-acbit=it_IT; Domain=.amazon.it; "
5472-
"Expires=Mon, 31-May-2027 10:00:00 GMT; Path=/",
5472+
"Expires=Mon, 31-May-3024 10:00:00 GMT; Path=/",
54735473
"i18n-prefs=EUR; Domain=.amazon.it; "
5474-
"Expires=Mon, 31-May-2027 10:00:00 GMT; Path=/",
5474+
"Expires=Mon, 31-May-3024 10:00:00 GMT; Path=/",
54755475
"av-profile=null; Domain=.amazon.it; "
5476-
"Expires=Mon, 31-May-2027 10:00:00 GMT; Path=/; Secure",
5476+
"Expires=Mon, 31-May-3024 10:00:00 GMT; Path=/; Secure",
54775477
'user-pref-token="Am81ywsJ69xObBnuJ2FbilVH0mg="; '
54785478
"Domain=.amazon.it; Path=/; Secure",
54795479
]

tests/test_cookiejar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ def test_update_cookies_from_headers_with_attributes() -> None:
13071307
"secure-cookie=value1; Secure; HttpOnly; SameSite=Strict",
13081308
"expiring-cookie=value2; Max-Age=3600; Path=/app",
13091309
"domain-cookie=value3; Domain=.example.com; Path=/",
1310-
"dated-cookie=value4; Expires=Wed, 09 Jun 2030 10:18:14 GMT",
1310+
"dated-cookie=value4; Expires=Wed, 09 Jun 3024 10:18:14 GMT",
13111311
]
13121312

13131313
jar.update_cookies_from_headers(headers, url)

0 commit comments

Comments
 (0)