diff --git a/tests/models/test_person.py b/tests/models/test_person.py index 186ea34532..e155063fa3 100644 --- a/tests/models/test_person.py +++ b/tests/models/test_person.py @@ -175,7 +175,7 @@ def test_delete_person(self): persons = self.get("data/persons") self.assertEqual(len(persons), 3) - def test_force_delete(self): + def test_cant_delete(self): self.generate_fixture_task_status_todo() self.generate_shot_suite() self.generate_assigned_task() @@ -183,5 +183,13 @@ def test_force_delete(self): self.person_id = str(self.person.id) self.get("data/persons/%s" % self.person_id) self.delete("data/persons/%s" % self.person_id, 400) + + def test_force_delete(self): + self.generate_fixture_task_status_todo() + self.generate_shot_suite() + self.generate_assigned_task() + self.generate_fixture_comment() + self.person_id = str(self.person.id) + self.get("data/persons/%s" % self.person_id) self.delete("data/persons/%s?force=true" % self.person_id) self.get("data/persons/%s" % self.person_id, 404) diff --git a/tests/shots/test_episodes.py b/tests/shots/test_episodes.py index 3c29e5f001..742e69b62f 100644 --- a/tests/shots/test_episodes.py +++ b/tests/shots/test_episodes.py @@ -126,11 +126,14 @@ def test_get_episodes_by_project_and_name(self): "data/episodes?project_id=%s&name=E01" % self.project_id, 403 ) - def test_delete_episode(self): + def test_force_delete_episode(self): self.get("data/episodes/%s" % self.episode_id) self.delete("data/episodes/%s" % self.episode_id, 400) - self.delete("data/episodes/%s?force=true" % self.episode_id) self.get("data/episodes/%s" % self.episode_id, 404) + def test_cant_delete_episode(self): + self.get("data/episodes/%s" % self.episode_id) + self.delete("data/episodes/%s" % self.episode_id, 400) + def test_episode_stats(self): pass diff --git a/tests/shots/test_sequences.py b/tests/shots/test_sequences.py index ebe8f68477..4cf96c7dce 100644 --- a/tests/shots/test_sequences.py +++ b/tests/shots/test_sequences.py @@ -103,8 +103,11 @@ def test_get_sequences_by_project_and_name(self): "data/sequences?project_id=%s&name=SE01" % self.project_id, 403 ) - def test_delete_sequence(self): + def test_force_delete_sequence(self): self.get("data/sequences/%s" % self.sequence_id) - self.delete("data/sequences/%s" % self.sequence_id, 400) self.delete("data/sequences/%s?force=true" % self.sequence_id) self.get("data/sequences/%s" % self.sequence_id, 404) + + def test_cant_delete_sequence(self): + self.get("data/sequences/%s" % self.sequence_id) + self.delete("data/sequences/%s" % self.sequence_id, 400) diff --git a/tests/source/shotgun/test_shotgun_import_teams.py b/tests/source/shotgun/test_shotgun_import_teams.py index aa07ab675c..03a2aeb836 100644 --- a/tests/source/shotgun/test_shotgun_import_teams.py +++ b/tests/source/shotgun/test_shotgun_import_teams.py @@ -14,11 +14,11 @@ def test_import_project_connections(self): project = projects_service.get_project_with_relations( projects[0]["id"] ) - self.assertEqual(len(project["team"]), 2) + self.assertEqual(len(project["team"]), 1) project = projects_service.get_project_with_relations( projects[1]["id"] ) - self.assertEqual(len(project["team"]), 1) + self.assertEqual(len(project["team"]), 2) def test_import_projects_twice(self): self.load_fixture("persons") @@ -29,7 +29,7 @@ def test_import_projects_twice(self): project = projects_service.get_project_with_relations( projects[0]["id"] ) - self.assertEqual(len(project["team"]), 1) + self.assertEqual(len(project["team"]), 2) def test_import_project_connection(self): self.load_fixture("persons")