Skip to content
Myr

Fixed too strict tests for cookie setting that broke on werkzeug changes

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent ef72b78 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:flask/testsuite/basic.py+2 added-2 removed
244 unmodified lines
245 return 'Hello World'246 rv = app.test_client().get('/', 'http://www.example.com:8080/test/')247 cookie = rv.headers['set-cookie'].lower()248 self.assert_in('domain=.example.com', cookie)249 self.assert_in('path=/;', cookie)249 self.assert_in('path=/', cookie)250 self.assert_in('secure', cookie)251 self.assert_not_in('httponly', cookie)252253 def test_missing_session(self):
26 unmodified lines
280281 client = app.test_client()282 rv = client.get('/')283 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'])285 expires = parse_date(match.group())286 expected = datetime.utcnow() + app.permanent_session_lifetime287 self.assert_equal(expires.year, expected.year)288 self.assert_equal(expires.month, expected.month)
912 unmodified lines