Remove unused store and CWA client code
The two functions that add chapters share one insert. Nothing used Store.current_revisions and CwaClient.check.
This commit is contained in:
+4
-2
@@ -10,9 +10,11 @@ def test_chapters_revisions_and_rules(tmp_path):
|
||||
assert [c["url"] for c in store.chapters_for_build(sid)] == ["u2", "u1"]
|
||||
|
||||
assert store.add_revision(c1, "<p>1b</p>", "h1b", "recheck") == 2
|
||||
assert store.current_revisions(sid)[c1] == {"rev": 2, "text_hash": "h1b", "source": "recheck"}
|
||||
newest = store.list_revisions(c1)[-1]
|
||||
assert (newest["rev"], newest["text_hash"], newest["source"]) == (2, "h1b", "recheck")
|
||||
assert store.get_chapter(c1)["current_rev"] == 2
|
||||
store.replace_revision(c1, 2, "<p>1c</p>", "h1c")
|
||||
assert store.current_revisions(sid)[c1]["text_hash"] == "h1c"
|
||||
assert store.list_revisions(c1)[-1]["text_hash"] == "h1c"
|
||||
assert store.revision_html(c1, 1) == "<p>1</p>"
|
||||
store.update_chapter(c1, current_rev=1, included=0)
|
||||
assert [c["url"] for c in store.chapters_for_build(sid)] == ["u2"]
|
||||
|
||||
Reference in New Issue
Block a user