feat(product-suite): add grouped generation history

This commit is contained in:
chengma
2026-07-16 23:47:47 +08:00
parent f3defdeb95
commit cd150ef6c7
8 changed files with 879 additions and 35 deletions
+36
View File
@@ -981,6 +981,42 @@ class ImageStudioTests(TempDirMixin, unittest.TestCase):
[failed_round, round_one, None],
[round_.generation_round_key for round_ in rounds],
)
self.assertEqual(
[failed_round],
[
round_.generation_round_key
for round_ in image_studio.list_generation_rounds(
project.id,
limit=1,
offset=0,
path=db_path,
)
],
)
self.assertEqual(
[round_one],
[
round_.generation_round_key
for round_ in image_studio.list_generation_rounds(
project.id,
limit=1,
offset=1,
path=db_path,
)
],
)
self.assertEqual(
[None],
[
round_.generation_round_key
for round_ in image_studio.list_generation_rounds(
project.id,
limit=1,
offset=2,
path=db_path,
)
],
)
summary = rounds[1]
self.assertTrue(summary.is_current)
self.assertEqual(3, summary.job_count)