Example #1
0
 def test_incorrect_scene(self):
     """Test validation functions on incorrect scene."""
     export_data = {
         'scene': 'Scene',
         'type': 'SCENE',
     }
     expected_result = (False, 'Asset has 266 bones')
     joint_count.run_validation(export_data)
     test_result = joint_count.get_validation_result()
     self.assertTrue(test_result == expected_result)
Example #2
0
 def test_non_armature_object(self):
     """Test validation function on non mesh object."""
     export_data = {
         'models': ['Cube'],
         'type': 'MODEL',
     }
     expected_result = (True, 'Asset has 0 bones')
     joint_count.run_validation(export_data)
     test_result = joint_count.get_validation_result()
     self.assertTrue(test_result == expected_result)
Example #3
0
 def test_incorrect_model(self):
     """Test validation functions on incorrect model."""
     export_data = {
         'models': ['Armature'],
         'type': 'MODEL',
     }
     expected_result = (False, 'Asset has 257 bones')
     joint_count.run_validation(export_data)
     test_result = joint_count.get_validation_result()
     self.assertTrue(test_result == expected_result)
Example #4
0
 def test_material(self):
     """Test validation function on correct material."""
     export_data = {
         'material': 'Material',
         'type': 'MATERIAL',
     }
     expected_result = (True, 'Asset has 0 bones')
     joint_count.run_validation(export_data)
     test_result = joint_count.get_validation_result()
     self.assertTrue(test_result == expected_result)