diff --git a/kolibri/core/device/test/test_api.py b/kolibri/core/device/test/test_api.py index 39127b9f61e..3d5afe7971c 100644 --- a/kolibri/core/device/test/test_api.py +++ b/kolibri/core/device/test/test_api.py @@ -201,8 +201,12 @@ def test_create_superuser_error(self): def test_osuser_superuser_created(self): with mock.patch( "kolibri.core.device.serializers.GetOSUserHook", autospec=True - ) as mock_hook1, mock.patch("kolibri.core.auth.models.GetOSUserHook") as mock_hook2: - mock_hook1.retrieve_os_user.return_value = mock_hook2.retrieve_os_user.return_value = ("test_user", True) + ) as mock_hook1, mock.patch( + "kolibri.core.auth.models.GetOSUserHook" + ) as mock_hook2: + mock_hook1.retrieve_os_user.return_value = ( + mock_hook2.retrieve_os_user.return_value + ) = ("test_user", True) mock_hook1.is_registered = mock_hook2.is_registered = True initialize_url = app_initialize_url(auth_token="test") self.client.get(initialize_url)