Added python3.6 support for tests

This commit is contained in:
Andrew Arendt 2017-01-10 11:20:53 -06:00
parent 88111ae6bf
commit 01b992b1a1
4 changed files with 9 additions and 5 deletions

View file

@ -333,7 +333,7 @@ def test_session_expiration():
client = app.test_client()
rv = client.get('/')
assert 'set-cookie' in rv.headers
match = re.search(r'\bexpires=([^;]+)(?i)', rv.headers['set-cookie'])
match = re.search(r'(?i)\bexpires=([^;]+)', rv.headers['set-cookie'])
expires = parse_date(match.group())
expected = datetime.utcnow() + app.permanent_session_lifetime
assert expires.year == expected.year