Skip to content

Commit

Permalink
Fixed too strict tests for cookie setting that broke on werkzeug changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Jun 5, 2013
1 parent ef72b78 commit fd99abe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flask/testsuite/basic.py
Expand Up @@ -246,7 +246,7 @@ def index():
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)

Expand Down Expand Up @@ -281,7 +281,7 @@ def test():
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)
Expand Down

0 comments on commit fd99abe

Please sign in to comment.