Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
Fixed bug in test_session_expiry (#164)
Browse files Browse the repository at this point in the history
Periodic functions were scheduled to a time, which was never reached
due to the frozen time. The @periodic decorator is called before the
time is frozen.
  • Loading branch information
cburchert authored Mar 6, 2017
1 parent a461bad commit 44de894
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions amivapi/tests/auth/test_session_expiry.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@

class TestSessionExpiry(WebTest):
def test_session_expiry(self):
with self.app.app_context(), freeze_time(
"2016-01-01 00:00:00") as frozen_time:
with self.app.app_context(), freeze_time() as frozen_time:
self.new_object("users", nethz="pablo", password="pass")
self.api.post('/sessions',
data={"username": "pablo", "password": "pass"},
Expand Down

0 comments on commit 44de894

Please sign in to comment.