def setUp(self): """ Creates test data. """ self._mockgun = Mockgun("https://test.shotgunstudio.com", login="******", password="******") # Create two users to assign to the pipeline configurations. self._user1 = self._mockgun.create("HumanUser", {"login": "******"}) self._user2 = self._mockgun.create("HumanUser", {"login": "******"}) # Create pipeline configurations that are assigned none, one or two users. self._mockgun.create("PipelineConfiguration", { "code": "with_user1", "users": [self._user1] }) self._mockgun.create("PipelineConfiguration", { "code": "with_user2", "users": [self._user2] }) self._mockgun.create("PipelineConfiguration", { "code": "with_both", "users": [self._user2, self._user1] }) self._mockgun.create("PipelineConfiguration", { "code": "with_none", "users": [] })
def setUp(self): """ Creates tests data. """ super(TestFilterOperator, self).setUp() self._mockgun = Mockgun("https://test.shotgunstudio.com", login="******", password="******") self._prj1_link = self._mockgun.create("Project", {"name": "prj1"}) self._prj2_link = self._mockgun.create("Project", {"name": "prj2"}) self._shot1 = self._mockgun.create("Shot", { "code": "shot1", "project": self._prj1_link }) self._shot2 = self._mockgun.create("Shot", { "code": "shot2", "project": self._prj1_link }) self._shot3 = self._mockgun.create("Shot", { "code": "shot3", "project": self._prj2_link })
def setUp(self): """ Creates test data. """ self._mockgun = Mockgun("https://test.shotgunstudio.com", login="******", password="******") self._user = self._mockgun.create("HumanUser", {"login": "******"})
def test_set_server_params_with_url_with_path(self): """ Make sure it works with a URL with a path """ mockgun = Mockgun("https://local/something/") self.assertEqual(mockgun.config.scheme, "https") self.assertEqual(mockgun.config.server, "local") self.assertEqual(mockgun.config.api_path, "/something/api3/json")
def test_set_server_params_with_regular_url(self): """ Make sure it works with a normal URL. """ mockgun = Mockgun("https://server.shotgunstudio.com/") self.assertEqual(mockgun.config.scheme, "https") self.assertEqual(mockgun.config.server, "server.shotgunstudio.com") self.assertEqual(mockgun.config.api_path, "/api3/json")
def setUp(self): """ Creates test data. """ super(TestValidateFilterSyntax, self).setUp() self._mockgun = Mockgun("https://test.shotgunstudio.com", login="******", password="******") self._mockgun.create("Shot", {"code": "shot"})
def setUp(self): """ Creates test data. """ self._mockgun = Mockgun("https://test.shotgunstudio.com", login="******", password="******") self._project_link = self._mockgun.create("Project", {"name": "project", "archived": False}) # This entity will ensure that a populated link field will be comparable. self._mockgun.create( "PipelineConfiguration", {"code": "with_project", "project": self._project_link, } ) # This entity will ensure that an unpopulated link field will be comparable. self._mockgun.create("PipelineConfiguration", {"code": "without_project"})