From fc156f799b6a3a04860efde0dfc585a7eec9d61c Mon Sep 17 00:00:00 2001 From: Evan Blaudy Date: Tue, 5 Nov 2024 18:03:24 +0100 Subject: [PATCH] [qa][breakdown] fix tests for breakdown_service._is_asset_ready --- tests/services/test_breakdown_service.py | 32 +++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/tests/services/test_breakdown_service.py b/tests/services/test_breakdown_service.py index 21d29f20e8..99d3e2485a 100644 --- a/tests/services/test_breakdown_service.py +++ b/tests/services/test_breakdown_service.py @@ -288,7 +288,10 @@ def test_is_asset_ready(self): self.assertEqual(priority_map[self.task_type_layout_id], 1) self.assertEqual(priority_map[self.task_type_animation_id], 2) self.assertEqual(priority_map[self.task_type_compositing_id], 3) - asset = {"ready_for": str(self.task_type_animation.id)} + asset = { + "ready_for": str(self.task_type_animation.id), + "is_shared": False, + } self.assertTrue( breakdown_service._is_asset_ready( asset, self.task_layout, priority_map @@ -305,6 +308,33 @@ def test_is_asset_ready(self): ) ) + asset = { + "ready_for": str(self.task_type_animation.id), + "is_shared": True, + "project_id": self.project_id, + } + self.assertTrue( + breakdown_service._is_asset_ready( + asset, self.task_layout, priority_map + ) + ) + self.assertTrue( + breakdown_service._is_asset_ready( + asset, self.task_animation, priority_map + ) + ) + self.assertFalse( + breakdown_service._is_asset_ready( + asset, self.task_compositing, priority_map + ) + ) + asset["project_id"] = "000000000000000000000000" + self.assertTrue( + breakdown_service._is_asset_ready( + asset, self.task_layout, priority_map + ) + ) + self.shot_id = str(self.shot.id) self.sequence_id = str(self.sequence.id) self.asset_id = str(self.asset.id)