From fd99abea57cfa3e72aee2116c58f962ec155a29c Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Wed, 5 Jun 2013 09:47:31 +0100 Subject: [PATCH] Fixed too strict tests for cookie setting that broke on werkzeug changes --- flask/testsuite/basic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/flask/testsuite/basic.py b/flask/testsuite/basic.py index 3a60eb81..70ea772d 100644 --- a/flask/testsuite/basic.py +++ b/flask/testsuite/basic.py @@ -246,7 +246,7 @@ class BasicFunctionalityTestCase(FlaskTestCase): rv = app.test_client().get('/', 'http://www.example.com:8080/test/') cookie = rv.headers['set-cookie'].lower() self.assert_in('domain=.example.com', cookie) - self.assert_in('path=/;', cookie) + self.assert_in('path=/', cookie) self.assert_in('secure', cookie) self.assert_not_in('httponly', cookie) @@ -281,7 +281,7 @@ class BasicFunctionalityTestCase(FlaskTestCase): client = app.test_client() rv = client.get('/') self.assert_in('set-cookie', rv.headers) - match = re.search(r'\bexpires=([^;]+)', rv.headers['set-cookie']) + match = re.search(r'\bexpires=([^;]+)(?i)', rv.headers['set-cookie']) expires = parse_date(match.group()) expected = datetime.utcnow() + app.permanent_session_lifetime self.assert_equal(expires.year, expected.year)