From 4304cd4a791b9175e0d33a68350fc0ec95c48b0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adeodato=20Sim=C3=B3?= Date: Tue, 9 Apr 2024 19:18:02 -0300 Subject: [PATCH] use re.escape --- bookwyrm/tests/models/test_status_model.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bookwyrm/tests/models/test_status_model.py b/bookwyrm/tests/models/test_status_model.py index c266999a7..6323eeca3 100644 --- a/bookwyrm/tests/models/test_status_model.py +++ b/bookwyrm/tests/models/test_status_model.py @@ -359,7 +359,8 @@ class Status(TestCase): ) activity = status.to_activity(pure=True) if pages: - expect_re = f'^

"my quote"

, {pages}

$' + pages_re = re.escape(pages) + expect_re = f'^

"my quote"

, {pages_re}

$' else: expect_re = '^

"my quote"

$' self.assertRegex(activity["content"], expect_re)