Fix `test_most_recently_used`

I see this failing about 50% of the time, and if it fails history1 and
history2 have the same update time.
This commit is contained in:
mvdbeek
2023-07-29 00:46:09 +01:00
committed by Nicola Soranzo
parent 849219d45a
commit b61fa18616
@@ -1,3 +1,4 @@
import time
from unittest import mock
import pytest
@@ -337,6 +338,9 @@ class TestHistoryManager(BaseTestCase):
history1 = self.history_manager.create(name="history1", user=user2)
self.trans.set_history(history1)
# sleep a tiny bit so update time for history2 is different from history1
time.sleep(0.1)
history2 = self.history_manager.create(name="history2", user=user2)
self.log("should be able to get the most recently used (updated) history for a given user")