Skip to content

Commit

Permalink
[qa][breakdown] fix tests for breakdown_service._is_asset_ready
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanBldy committed Nov 5, 2024
1 parent 3a1749b commit fc156f7
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion tests/services/test_breakdown_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit fc156f7

Please sign in to comment.