def test_add_to_category_all_heads_if_wm_wrls_is_not_cable(self): # GIVEN a configs file and a new object with wm_wrls.type_of_part is cable bpy.context.window_manager.wrls.type_of_part = 'Head / Tail' # WHEN the object is added as part wireless.add_to_category(self.object, self.data) self.assertIn('Custom Cube', self.data['model_types']['All Heads and Tails'])
def test_add_to_category_if_wm_wrls_is_head_and_category_is_not_all_heads(self): # GIVEN new object with wm_wrls.type_of_part is cable bpy.context.window_manager.wrls.type_of_part = 'Head / Tail' bpy.context.window_manager.wrls.head_categories = 'Electric Plugs' # WHEN the object is added as part wireless.add_to_category(self.object, self.data) self.assertIn('Custom Cube', self.data['model_types']['Electric Plugs'])