From 0c7095a3c07d9f19b10a5913e794b1ab81195287 Mon Sep 17 00:00:00 2001 From: vincent porte Date: Wed, 5 Mar 2025 10:51:18 +0100 Subject: [PATCH] fix test becoming flaky --- lacommunaute/search/__snapshots__/tests.ambr | 4 ++-- lacommunaute/search/tests.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lacommunaute/search/__snapshots__/tests.ambr b/lacommunaute/search/__snapshots__/tests.ambr index 5a9f3fb11..d9ded8844 100644 --- a/lacommunaute/search/__snapshots__/tests.ambr +++ b/lacommunaute/search/__snapshots__/tests.ambr @@ -153,7 +153,7 @@

Aucun résultat ? Posez votre question dans l'espace d'échanges !

- + Poser une question @@ -274,7 +274,7 @@

Aucun résultat ? Posez votre question dans l'espace d'échanges !

- + Poser une question diff --git a/lacommunaute/search/tests.py b/lacommunaute/search/tests.py index 67655ac57..a16e1188b 100644 --- a/lacommunaute/search/tests.py +++ b/lacommunaute/search/tests.py @@ -209,7 +209,7 @@ def test_extra_context(client, db, user, snapshot_name, search_url, snapshot): datas = {"m": "TOPIC", "q": " ".join(["Bubba", "Gump", "Shrimp", "Co."])} response = client.get(search_url, datas) content = parse_response_to_soup( - response, selector="main", replace_in_href=[(forum.slug, "forrest-gump"), (str(forum.pk), "42")] + response, selector="main", replace_in_href=[(f"{forum.slug}-{forum.pk}", "forrest-gump-PK")] ) assert str(content) == snapshot(name=snapshot_name)