Skip to content

Commit

Permalink
Fix order of link test data
Browse files Browse the repository at this point in the history
  • Loading branch information
MizukiTemma committed Jan 17, 2025
1 parent 927a30f commit df19efc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions integreat_cms/cms/fixtures/test_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
},
Expand Down
8 changes: 4 additions & 4 deletions tests/cms/views/link_replace/test_link_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/"
Expand Down Expand Up @@ -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
Expand All @@ -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.
Expand Down

0 comments on commit df19efc

Please sign in to comment.