Skip to content

Commit

Permalink
Add test for issue: httpie#998
Browse files Browse the repository at this point in the history
  • Loading branch information
finik-dev-team committed Feb 5, 2021
1 parent 1d4c35f commit 8c116e8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_sessions.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,15 @@ def test_expired_cookies(self, httpbin):
assert 'cookie1' in updated_session['cookies']
assert 'cookie2' not in updated_session['cookies']

def test_get_expired_cookies_using_max_age(self):
headers = [
('Set-Cookie', 'one=two; Max-Age=0; path=/; domain=.tumblr.com; HttpOnly')
]
expected_expired = [
{'name': 'one', 'path': '/'}
]
assert get_expired_cookies(headers, now=None) == expected_expired

@pytest.mark.parametrize(
argnames=['headers', 'now', 'expected_expired'],
argvalues=[
Expand Down

0 comments on commit 8c116e8

Please sign in to comment.