Global mocking causes this to become a MagicMock, however we need to preserve this to ensure that sorting of the releases in tests continues to work properly. Drive-by fix for Python 3.12 compatibility in assert usage. Change-Id: I07aa60c270c5966018931c25ffe66cd3c89a77a3