def setUp( self, app_instance="tk-multi-workfiles2", work_template="sandbox_path", publish_template="publish_path", ): """ Fixtures setup """ # Make sure the project folder on disk has a unique name between each test. super(Workfiles2TestBase, self).setUp({"project_tank_name": self.short_test_name}) sgtk.set_authenticated_user(SealedMock(login="******")) self.jeff = self.mockgun.create("HumanUser", { "name": "Jeff", "login": "******" }) self.francis = self.mockgun.create("HumanUser", { "name": "Francis", "login": "******" }) self.rob = self.mockgun.create("HumanUser", { "name": "Rob", "login": "******" }) self.setup_fixtures() # Add these to mocked shotgun self.add_to_sg_mock_db([self.project]) # run folder creation for the project self.tk.create_filesystem_structure(self.project["type"], self.project["id"]) # now make a context context = self.tk.context_from_entity(self.project["type"], self.project["id"]) # and start the engine self.engine = sgtk.platform.start_engine("tk-testengine", self.tk, context) # This ensures that the engine will always be destroyed. self.addCleanup(self.engine.destroy) self.app = self.engine.apps[app_instance] self.tk_multi_workfiles = self.app.import_module("tk_multi_workfiles") self.bg_task_manager = ( self.app.frameworks["tk-framework-shotgunutils"].import_module( "task_manager").BackgroundTaskManager(parent=None, start_processing=True)) self.addCleanup(self.bg_task_manager.shut_down) self.work_template = self.tk.templates[work_template] self.publish_template = self.tk.templates[publish_template]