T-566 封面历史归档数据层

This commit is contained in:
chengma
2026-07-09 11:23:18 +08:00
parent fa27134f7c
commit 71e51d0608
6 changed files with 354 additions and 12 deletions
+8 -1
View File
@@ -2151,7 +2151,14 @@ class GuiTests(TempDirMixin, unittest.TestCase):
self.assertEqual("success", updated.status)
self.assertIsNone(updated.new_title)
self.assertIsNone(updated.new_cover_path)
self.assertTrue(os.path.exists(new_cover))
self.assertFalse(os.path.exists(new_cover))
archived_covers = [
filename
for filename in os.listdir(temp_dir)
if filename.startswith("new_") and filename.endswith(".jpg")
]
self.assertEqual(1, len(archived_covers))
self.assertTrue(os.path.exists(os.path.join(temp_dir, archived_covers[0])))
run_log = db.list_run_logs(limit=1, run_type="reset", path=cfg["db_path"])[0]
self.assertEqual("done", run_log.status)
self.assertEqual("reset_generated", run_log.options["action"])