SG-41387 Add parameter created_at for sg.upload #444
+19
−1
Azure Pipelines / python-api
failed
Feb 23, 2026 in 10m 4s
Build #20260223.1 had test failures
Details
- Failed: 1 (0.04%)
- Passed: 2,783 (99.96%)
- Other: 0 (0.00%)
- Total: 2,784
- 1451 of 1849 line covered (78.47%)
Annotations
Check failure on line 45 in Build log
azure-pipelines / python-api
Build log #L45
Bash exited with code '1'.
Check failure on line 546 in Build log
azure-pipelines / python-api
Build log #L546
Bash exited with code '1'.
Check failure on line 1 in tests/test_api.py::TestShotgunApi::test_work_schedule
azure-pipelines / python-api
tests/test_api.py::TestShotgunApi::test_work_schedule
self = <tests.test_api.TestShotgunApi testMethod=test_work_schedule>
def test_work_schedule(self):
"""test_work_schedule tests WorkDayRules api"""
self.maxDiff = None
start_date = "2012-01-01"
start_date_obj = datetime.datetime(2012, 1, 1)
end_date = "2012-01-07"
end_date_obj = datetime.datetime(2012, 1, 7)
project = self.project
# We're going to be comparing this value with the value returned from the server, so extract only the type, id
# and name
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)
# Test that the work_schedule_read api method is called with the 'start_date' and 'end_date' arguments
# in the 'YYYY-MM-DD' string format.
self.assertRaises(
shotgun_api3.ShotgunError,
self.sg.work_schedule_read,
start_date_obj,
end_date_obj,
project,
user,
)
resp = self.sg.work_schedule_update("2012-01-02", False, "Studio Holiday")
expected = {
"date": "2012-01-02",
"description": "Studio Holiday",
"project": None,
"user": None,
"working": False,
}
self.assertEqual(expected, resp)
resp = self.sg.work_schedule_read(start_date, end_date, project, user)
work_schedule["2012-01-02"] = {
"reason": "STUDIO_EXCEPTION",
"working": False,
"description": "Studio Holiday",
}
> self.assertEqual(work_schedule, resp)
E AssertionError: {'201[92 chars]': {'reason': 'STUDIO_EXCEPTION', 'working': F[481 chars]EK'}} != {'201[92 chars]': {'working': True, 'description': None, 'rea[468 chars]EK'}}
E {'2012-01-01': {'description': None,
E 'reason': 'STUDIO_WORK_WEEK',
E 'working': False},
E - '2012-01-02': {'description': 'Studio Holiday',
E ? ^^^^^^ ^^^^^^^^^
E
E + '2012-01-02': {'description': None,
E ? ^ ^^
E
E - 'reason': 'STUDIO_EXCEPTION',
E ? -- ^^^^^
E
E + 'reason': 'STUDIO_WORK_WEEK',
E ? ++++++ ^
E
E - 'working': False},
E ? ^^^^
E
E + 'working': True},
E ? ^^^
E
E '2012-01-03': {'description': 'Project Holiday',
E 'reason': 'PROJECT_EXCEPTION',
E 'working': False},
E '2012-01-04': {'description': 'Artist Holiday',
E 'reason': 'USER_EXCEPTION',
E 'working': False},
E '2012-01-05': {'description': None,
E 'reason': 'STUDIO_WORK_WEEK',
E 'working': True},
E '2012-01-06': {'description': None,
E 'reason': 'STUDIO_WORK_WEEK',
E 'working': True},
E '2012-01-07': {'description': None,
E 'reason': 'STUDIO_WORK_WEEK',
E 'working': False}}
tests/test_api.py:894: AssertionError
Raw output
/Users/runner/hostedtoolcache/Python/3.9.25/x64/lib/python3.9/unittest/case.py:676: AssertionError: {'201[92 chars]': {'reason': 'STUDIO_EXCEPTION', 'working': F[481 chars]EK'}} != {'201[92 chars]': {'working': True, 'description': None, 'rea[468 chars]EK'}}
Loading