Skip to content

Commit

Permalink
Merge pull request #7767 from ckan/froze-after-token-creation
Browse files Browse the repository at this point in the history
Fix flaky test
  • Loading branch information
wardi committed Aug 31, 2023
2 parents 6dc1696 + ea118ce commit cff1cba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ckan/tests/model/test_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,12 +232,12 @@ def test_user_last_active(self, app):
from ckan.lib.helpers import url_for
from freezegun import freeze_time

frozen_time = datetime.datetime.utcnow()
data = factories.User()
dataset = factories.Dataset()
user_token = factories.APIToken(user=data["name"])
headers = {"Authorization": user_token["token"]}

frozen_time = datetime.datetime.utcnow()
with freeze_time(frozen_time):
user = model.User.get(data["id"])
assert user.last_active is None
Expand Down

0 comments on commit cff1cba

Please sign in to comment.