Skip to content

Commit

Permalink
[qa] fix tests due to rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanBldy committed Oct 8, 2024
1 parent 1657d82 commit afb1f67
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
10 changes: 9 additions & 1 deletion tests/models/test_person.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,13 +175,21 @@ 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()
self.generate_fixture_comment()
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)
7 changes: 5 additions & 2 deletions tests/shots/test_episodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 5 additions & 2 deletions tests/shots/test_sequences.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
6 changes: 3 additions & 3 deletions tests/source/shotgun/test_shotgun_import_teams.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand Down

0 comments on commit afb1f67

Please sign in to comment.