Sort the story list without a leading The, A or An
This commit is contained in:
@@ -47,6 +47,14 @@ def test_list_stories_counts_offsite_and_revised_chapters(tmp_path):
|
||||
assert story["revised_count"] == 1
|
||||
|
||||
|
||||
def test_list_stories_sorts_titles_without_leading_articles(tmp_path):
|
||||
store = Store(tmp_path / "db.sqlite")
|
||||
for n, title in enumerate(["The Zebra", "an Owl", "Anthem", "A Bee", "Theory", "Cat"]):
|
||||
store.create_story(f"https://example/s/{n}", "example", title, "A", [])
|
||||
titles = [s["title"] for s in store.list_stories()]
|
||||
assert titles == ["Anthem", "A Bee", "Cat", "an Owl", "Theory", "The Zebra"]
|
||||
|
||||
|
||||
def test_cover_replaces_previous_cover(tmp_path):
|
||||
store = Store(tmp_path / "db.sqlite")
|
||||
sid = store.create_story("u", "s", "T", "A", [])
|
||||
|
||||
Reference in New Issue
Block a user