Merge pull request #2496 from bookwyrm-social/unit-test

Trying to fix an unreliable unit test regex
This commit is contained in:
Mouse Reeve 2022-12-11 11:22:56 -08:00 committed by GitHub
commit 0452731d02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -194,7 +194,7 @@ class Status(TestCase):
self.assertEqual(activity["attachment"][0]["type"], "Document") self.assertEqual(activity["attachment"][0]["type"], "Document")
self.assertTrue( self.assertTrue(
re.match( re.match(
r"https:\/\/your.domain.here\/images\/covers\/test_[A-z0-9]+.jpg", r"https:\/\/your.domain.here\/images\/covers\/test(_[A-z0-9]+)?.jpg",
activity["attachment"][0]["url"], activity["attachment"][0]["url"],
) )
) )