Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wagtail 6.4 #1794

Merged
merged 8 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions etna/records/tests/test_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def test_add_record_links(self):
reverse("wagtailadmin_pages:edit", args=(self.article_page.id,)),
data,
)
self.assertEqual(len(responses.calls), 3)
self.assertEqual(len(responses.calls), 2)
self.assertRedirects(
response,
reverse("wagtailadmin_explore", args=(self.article_index_page.id,)),
Expand All @@ -126,7 +126,7 @@ def test_add_record_links(self):
self.assertEqual(record_link["descriptive_title"], BLOCK_TITLE_OVERRIDE)
self.assertEqual(record_link["record"].iaid, TEST_RECORD_DATA["iaid"])

self.assertEqual(len(responses.calls), 4)
self.assertEqual(len(responses.calls), 3)
self.assertEqual(
responses.calls[0].request.url,
f"{settings.CLIENT_BASE_URL}/fetch?metadataId=C123456",
Expand Down Expand Up @@ -169,7 +169,7 @@ def test_page_with_record_links(self):
self.article_page.save()

# Wagtail's reference index population will cause the body to be evaluated
self.assertEqual(len(responses.calls), 1)
self.assertEqual(len(responses.calls), 0)

# Check the edit view first
response = self.client.get(
Expand All @@ -178,7 +178,7 @@ def test_page_with_record_links(self):
self.assertContains(response, BLOCK_TITLE_OVERRIDE)

# The record details are requested again to display for the field value
self.assertEqual(len(responses.calls), 2)
self.assertEqual(len(responses.calls), 1)
self.assertEqual(
responses.calls[0].request.url,
f"{settings.CLIENT_BASE_URL}/fetchAll?metadataIds=C123456",
Expand All @@ -191,7 +191,7 @@ def test_page_with_record_links(self):
response,
'href="/catalogue/id/' + TEST_RECORD_DATA["iaid"] + '/"',
)
self.assertEqual(len(responses.calls), 3)
self.assertEqual(len(responses.calls), 2)
self.assertEqual(
responses.calls[1].request.url,
f"{settings.CLIENT_BASE_URL}/fetchAll?metadataIds=C123456",
Expand Down
Loading