Skip to content

Commit

Permalink
🧪 FIX failing test due to refactorings
Browse files Browse the repository at this point in the history
  • Loading branch information
stefrado committed Oct 16, 2024
1 parent 36c59a3 commit 79debf2
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions src/sdg/producten/tests/test_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,29 +269,16 @@ def test_concept_product_preview_link_is_shown_and_working(self):
page_preview_current_url_nl = response.pyquery("#preview-current[lang=nl]")
self.assertEqual(page_preview_current_url_nl.length, 0)

page_preview_concept_url_nl = response.pyquery(
"#preview-concept[lang=nl]"
).attr("href")
self.assertEqual(
page_preview_concept_url_nl, f"{preview_url}?status=concept&taal=nl"
)

preview_response_nl = self.app.get(page_preview_concept_url_nl)
self.assertEqual(preview_response_nl.status_code, 200)

page_preview_current_url_en = response.pyquery("#preview-current[lang=en]")
self.assertEqual(page_preview_current_url_en.length, 0)

page_preview_concept_url_en = response.pyquery(
"#preview-concept[lang=en]"
).attr("href")

page_preview_concept_url = response.pyquery("#preview-concept").attr("href")
self.assertEqual(
page_preview_concept_url_en, f"{preview_url}?status=concept&taal=en"
page_preview_concept_url, f"{preview_url}?status=concept"
)

preview_response_en = self.app.get(page_preview_concept_url_en)
self.assertEqual(preview_response_en.status_code, 200)
preview_response = self.app.get(page_preview_concept_url)
self.assertEqual(preview_response.status_code, 200)

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

0 comments on commit 79debf2

Please sign in to comment.