mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-22 01:21:07 +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)
|
||||
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:
|
||||
expect_re = '^<p>"my quote"</p> <p>— <a .+</a></p>$'
|
||||
self.assertRegex(activity["content"], expect_re)
|
||||
|
|
Loading…
Reference in a new issue