fix(schema): do nothing when there is no series
This commit is contained in:
@@ -31,3 +31,16 @@ def test_comic_template():
|
||||
def test_first_author_only():
|
||||
r = req(title="X", authors="Alice A, Bob B")
|
||||
assert render_template("{Author}", r) == "Alice A"
|
||||
|
||||
|
||||
def test_empty_series_level_is_dropped():
|
||||
r = req(title="Der Ickabog", authors="J.K. Rowling")
|
||||
assert render_template("{Author}/{Series}/{Title} ({Narrator})", r) == "J.K. Rowling/Der Ickabog"
|
||||
|
||||
|
||||
def test_series_level_kept_when_set():
|
||||
r = req(title="Harry Potter und der Feuerkelch", authors="J.K. Rowling",
|
||||
series="Harry Potter")
|
||||
r.narrator = "Rufus Beck"
|
||||
assert render_template("{Author}/{Series}/{Title} ({Narrator})", r) == \
|
||||
"J.K. Rowling/Harry Potter/Harry Potter und der Feuerkelch (Rufus Beck)"
|
||||
|
||||
Reference in New Issue
Block a user