Skip to content

Commit

Permalink
💚 [DEV] FIX sudden CI fails
Browse files Browse the repository at this point in the history
  • Loading branch information
stefrado committed Dec 6, 2024
1 parent 6679e7c commit 3b59762
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/sdg/producten/tests/test_product.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import html
from datetime import datetime
from typing import Optional

from django.test import override_settings
Expand Down Expand Up @@ -1181,11 +1182,17 @@ def test_history_displays_reference_version(self):
self.assertEqual(response.status_code, 200)

revisions = response.pyquery(".revision-list")
latest_active_version = self.product_version.gemaakt_door
self.assertIn(
str(self.product_version.gemaakt_door), revisions[1].text_content()
)

self.assertEqual(len(revisions), 2)
self.assertIn(str(latest_active_version), revisions[1].text_content())
self.assertIn(str(self.reference_product), revisions[1].text_content())
for index, item in enumerate(revisions[1].getiterator("strong")):
if index == 1:
rev_date = datetime.fromisoformat(item.values()[0])
edit_date = datetime.fromisoformat(
str(self.product_version.gewijzigd_op)
)
self.assertEqual(str(rev_date), str(edit_date))

@freeze_time(NOW_DATE)
def test_consultant__cannot_update_product(self):
Expand Down

0 comments on commit 3b59762

Please sign in to comment.