Skip to content

Commit fd99abe

Browse files
committed
Fixed too strict tests for cookie setting that broke on werkzeug changes
1 parent ef72b78 commit fd99abe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flask/testsuite/basic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ def index():
246246
rv = app.test_client().get('/', 'http://www.example.com:8080/test/')
247247
cookie = rv.headers['set-cookie'].lower()
248248
self.assert_in('domain=.example.com', cookie)
249-
self.assert_in('path=/;', cookie)
249+
self.assert_in('path=/', cookie)
250250
self.assert_in('secure', cookie)
251251
self.assert_not_in('httponly', cookie)
252252

@@ -281,7 +281,7 @@ def test():
281281
client = app.test_client()
282282
rv = client.get('/')
283283
self.assert_in('set-cookie', rv.headers)
284-
match = re.search(r'\bexpires=([^;]+)', rv.headers['set-cookie'])
284+
match = re.search(r'\bexpires=([^;]+)(?i)', rv.headers['set-cookie'])
285285
expires = parse_date(match.group())
286286
expected = datetime.utcnow() + app.permanent_session_lifetime
287287
self.assert_equal(expires.year, expected.year)

0 commit comments

Comments
 (0)