mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-25 11:01:12 +00:00
test_quotation_page_serialization: use strings for page numbers
This follows from #3273, "Allow page numbers to be text, instead of integers".
This commit is contained in:
parent
21a39f8170
commit
f844abcad9
1 changed files with 6 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
""" testing models """
|
||||
from unittest import expectedFailure
|
||||
from unittest.mock import patch
|
||||
import pathlib
|
||||
import re
|
||||
|
@ -337,11 +338,14 @@ class Status(TestCase):
|
|||
activity["attachment"][0]["name"], "Author Name: Test Edition (worm)"
|
||||
)
|
||||
|
||||
@expectedFailure
|
||||
def test_quotation_page_serialization(self, *_):
|
||||
"""serialization of quotation page position"""
|
||||
tests = [
|
||||
("single pos", 7, None, "p. 7"),
|
||||
("page range", 7, 10, "pp. 7-10"),
|
||||
("single pos", "7", "", "p. 7"),
|
||||
("page range", "7", "10", "pp. 7-10"),
|
||||
("page range roman", "xv", "xvi", "pp. xv-xvi"),
|
||||
("page range reverse", "14", "10", "pp. 14-10"),
|
||||
]
|
||||
for desc, beg, end, pages in tests:
|
||||
with self.subTest(desc):
|
||||
|
|
Loading…
Reference in a new issue