Skip to content

Commit

Permalink
fix time in snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
jedie committed May 21, 2024
1 parent 355d0c2 commit 860b33c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions reversion_compare/tests/test_variant_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
:license: GNU GPL v3 or above, see LICENSE for more details.
"""
from bx_django_utils.test_utils.html_assertion import assert_html_response_snapshot, get_django_name_suffix
from freezegun import freeze_time
from override_storage import locmem_stats_override_storage
from override_storage.utils import Stats
from reversion import create_revision, is_registered
Expand Down Expand Up @@ -95,7 +96,10 @@ def test_initial_state(self):
self.assertEqual(Revision.objects.all().count(), count)
self.assertEqual(len(self.version_ids), count)

@freeze_time('2024-02-01')
def test_all_changes(self):
self.client.force_login(self.user)

# debug_response(self.client.get("/admin/reversion_compare_project/variantmodel/1/history/"))
# compare initial with last version
response = self.client.get(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ <h3>
</h3>
<div class="module">
<pre class="highlight">
<del>- Aug. 19, 2005, 8:13 a.m.</del> (time since that date: 18 years, 6 months)
<del>- Aug. 19, 2005, 8:13 a.m.</del> (time since that date: 18 years, 5 months)
<ins>+ Jan. 1, 2000, midnight</ins> (time since that date: 24 years, 1 month)
</pre>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ <h3>
</h3>
<div class="module">
<pre class="highlight">
<del>- Aug. 19, 2005, 8:13 a.m.</del> (time since that date: 18 years, 6 months)
<del>- Aug. 19, 2005, 8:13 a.m.</del> (time since that date: 18 years, 5 months)
<ins>+ Jan. 1, 2000, midnight</ins> (time since that date: 24 years, 1 month)
</pre>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ <h3>
</h3>
<div class="module">
<pre class="highlight">
<del>- Aug. 19, 2005, 8:13 a.m.</del> (time since that date: 18 years, 6 months)
<del>- Aug. 19, 2005, 8:13 a.m.</del> (time since that date: 18 years, 5 months)
<ins>+ Jan. 1, 2000, midnight</ins> (time since that date: 24 years, 1 month)
</pre>
</div>
Expand Down

0 comments on commit 860b33c

Please sign in to comment.