Skip to content

Commit 7ac2ccd

Browse files
authored
SG-24020: Fixes a bug in the schedule test (#250)
Reactivates and fixes a broken test.
1 parent 4a8f543 commit 7ac2ccd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_api.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,9 @@ def test_work_schedule(self):
785785
end_date_obj = datetime.datetime(2012, 1, 7)
786786

787787
project = self.project
788-
user = self.sg.find_one('HumanUser', [['projects', 'is', project]], ['name'])
788+
# We're going to be comparing this value with the value returned from the server, so extract only the type
789+
# and id
790+
user = {"type": self.human_user["type"], "id": self.human_user["id"], "name": self.human_user["name"]}
789791

790792
work_schedule = self.sg.work_schedule_read(start_date, end_date, project, user)
791793

@@ -842,7 +844,7 @@ def test_work_schedule(self):
842844
resp = self.sg.work_schedule_read(start_date, end_date, project, user)
843845
work_schedule['2012-01-04'] = {"reason": "USER_EXCEPTION", "working": False, "description": "Artist Holiday"}
844846
# FIXME: There seems to be a regresion on the Shotgun server that needs to be fixed. Disabling the test
845-
# self.assertEqual(work_schedule, resp)
847+
self.assertEqual(work_schedule, resp)
846848

847849
# For now disable tests that are erroneously failling on some sites to
848850
# allow CI to pass until the known issue causing this is resolved.

0 commit comments

Comments
 (0)