From df19efcb93220965e66b72c095c901c5cde125bf Mon Sep 17 00:00:00 2001 From: MizukiTemma Date: Fri, 17 Jan 2025 15:44:48 +0100 Subject: [PATCH] Fix order of link test data --- integreat_cms/cms/fixtures/test_data.json | 16 ++++++++-------- .../cms/views/link_replace/test_link_actions.py | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/integreat_cms/cms/fixtures/test_data.json b/integreat_cms/cms/fixtures/test_data.json index 4ab9053a93..6f1055e4cf 100644 --- a/integreat_cms/cms/fixtures/test_data.json +++ b/integreat_cms/cms/fixtures/test_data.json @@ -2793,25 +2793,25 @@ }, { "model": "linkcheck.link", - "pk": 40, + "pk": 39, "fields": { "content_type": ["cms", "pagetranslation"], - "object_id": 101, + "object_id": 99, "field": "content", - "url": 21, - "text": "Contact", + "url": 4, + "text": "Unchecked ink", "ignore": false } }, { "model": "linkcheck.link", - "pk": 39, + "pk": 40, "fields": { "content_type": ["cms", "pagetranslation"], - "object_id": 99, + "object_id": 101, "field": "content", - "url": 4, - "text": "Unchecked ink", + "url": 21, + "text": "Contact", "ignore": false } }, diff --git a/tests/cms/views/link_replace/test_link_actions.py b/tests/cms/views/link_replace/test_link_actions.py index 797f19b9e2..855c5a07e3 100644 --- a/tests/cms/views/link_replace/test_link_actions.py +++ b/tests/cms/views/link_replace/test_link_actions.py @@ -94,7 +94,7 @@ def test_url_replace( ) assert Link.objects.filter(url__url=OLD_URL).count() == after - #assert Link.objects.filter(url__url=NEW_URL).count() == before - after + # assert Link.objects.filter(url__url=NEW_URL).count() == before - after elif role == ANONYMOUS: assert response.status_code == 302 @@ -109,6 +109,7 @@ def test_url_replace( assert Link.objects.filter(url__url=OLD_URL).count() == before assert not Link.objects.filter(url__url=NEW_URL).exists() + # ----------- Test for search&replace -----------# # string to be replaced SEARCH = "/augsburg/de/willkommen/" @@ -187,10 +188,10 @@ def test_search_and_replace_links( ) assert Link.objects.filter(url__url=SEARCH_REPLACE_TARGET_URL).count() == after - #assert ( + # assert ( # Link.objects.filter(url__url=TARGET_URL_AFTER_REPLACE).count() # == before - after - #) + # ) elif role == ANONYMOUS: assert response.status_code == 302 @@ -207,7 +208,6 @@ def test_search_and_replace_links( assert Link.objects.filter(url__url=TARGET_URL_AFTER_REPLACE).count() == 0 - # ----------- Test for bulk action ignore/unignore -----------# # Url to use for test # This URL is used once in region Nürnberg and three times in Augsburg.