def test_get_or_create_software(self):
     self.assertIsNone(Software.get_by(name="Maya"))
     software = files_service.get_or_create_software("Maya", "may", ".ma")
     self.assertIsNotNone(Software.get_by(name="Maya"))
     software_again = files_service.get_or_create_software(
         "Maya", "may", ".ma")
     self.assertEqual(software["id"], software_again["id"])
Example #2
0
 def generate_fixture_software(self):
     self.software = Software.create(name="Blender",
                                     short_name="bdr",
                                     file_extension=".blender")
     self.software_max = Software.create(name="3dsMax",
                                         short_name="max",
                                         file_extension=".max")