From 168f9a7c8c8d4858151f54f3dcc5f60d4b569ebd Mon Sep 17 00:00:00 2001 From: Jean-Francois Boismenu Date: Thu, 23 Sep 2021 15:14:47 -0400 Subject: [PATCH 1/4] prove that it's broken --- tests/test_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_api.py b/tests/test_api.py index f264fa85e..ca9a6f94e 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -842,7 +842,7 @@ def test_work_schedule(self): resp = self.sg.work_schedule_read(start_date, end_date, project, user) work_schedule['2012-01-04'] = {"reason": "USER_EXCEPTION", "working": False, "description": "Artist Holiday"} # FIXME: There seems to be a regresion on the Shotgun server that needs to be fixed. Disabling the test - # self.assertEqual(work_schedule, resp) + self.assertEqual(work_schedule, resp) # For now disable tests that are erroneously failling on some sites to # allow CI to pass until the known issue causing this is resolved. From 39820d475652a1009b1cd09a2550e7c7367bcc94 Mon Sep 17 00:00:00 2001 From: Jean-Francois Boismenu Date: Thu, 23 Sep 2021 15:21:44 -0400 Subject: [PATCH 2/4] fix --- tests/test_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_api.py b/tests/test_api.py index ca9a6f94e..c30ef6d9b 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -785,7 +785,7 @@ def test_work_schedule(self): end_date_obj = datetime.datetime(2012, 1, 7) project = self.project - user = self.sg.find_one('HumanUser', [['projects', 'is', project]], ['name']) + user = self.human_user work_schedule = self.sg.work_schedule_read(start_date, end_date, project, user) From 5680fbe236dddd6f45847d469d69762ca376baa2 Mon Sep 17 00:00:00 2001 From: Jean-Francois Boismenu Date: Thu, 23 Sep 2021 15:30:39 -0400 Subject: [PATCH 3/4] fix-er --- tests/test_api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_api.py b/tests/test_api.py index c30ef6d9b..8a1616b52 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -785,7 +785,9 @@ def test_work_schedule(self): end_date_obj = datetime.datetime(2012, 1, 7) project = self.project - user = self.human_user + # We're going to be comparing this value with the value returned from the server, so extract only the type + # and id + user = {"type": self.human_user["type"], "id": self.human_user["id"]} work_schedule = self.sg.work_schedule_read(start_date, end_date, project, user) From 7113093ebff30d531bcdbae99f59006fabf81b83 Mon Sep 17 00:00:00 2001 From: Jean-Francois Boismenu Date: Thu, 23 Sep 2021 15:43:48 -0400 Subject: [PATCH 4/4] re-fixed --- tests/test_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_api.py b/tests/test_api.py index 8a1616b52..506322164 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -787,7 +787,7 @@ def test_work_schedule(self): project = self.project # We're going to be comparing this value with the value returned from the server, so extract only the type # and id - user = {"type": self.human_user["type"], "id": self.human_user["id"]} + user = {"type": self.human_user["type"], "id": self.human_user["id"], "name": self.human_user["name"]} work_schedule = self.sg.work_schedule_read(start_date, end_date, project, user)