mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-29 04:51:11 +00:00
use re.escape
This commit is contained in:
parent
8733369605
commit
4304cd4a79
1 changed files with 2 additions and 1 deletions
|
@ -359,7 +359,8 @@ class Status(TestCase):
|
||||||
)
|
)
|
||||||
activity = status.to_activity(pure=True)
|
activity = status.to_activity(pure=True)
|
||||||
if pages:
|
if pages:
|
||||||
expect_re = f'^<p>"my quote"</p> <p>— <a .+</a>, {pages}</p>$'
|
pages_re = re.escape(pages)
|
||||||
|
expect_re = f'^<p>"my quote"</p> <p>— <a .+</a>, {pages_re}</p>$'
|
||||||
else:
|
else:
|
||||||
expect_re = '^<p>"my quote"</p> <p>— <a .+</a></p>$'
|
expect_re = '^<p>"my quote"</p> <p>— <a .+</a></p>$'
|
||||||
self.assertRegex(activity["content"], expect_re)
|
self.assertRegex(activity["content"], expect_re)
|
||||||
|
|
Loading…
Reference in a new issue