diff --git a/test/deadline_submitter_for_maya/unit/__init__.py b/test/deadline_submitter_for_maya/unit/__init__.py index d02bc03..66b3052 100644 --- a/test/deadline_submitter_for_maya/unit/__init__.py +++ b/test/deadline_submitter_for_maya/unit/__init__.py @@ -1,7 +1,7 @@ # Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. import sys -from unittest.mock import MagicMock +from unittest.mock import MagicMock, Mock # we must mock maya and UI code mock_modules = [ @@ -25,6 +25,13 @@ for module in mock_modules: sys.modules[module] = MagicMock() +# Mock the call to DeadlineCredentialsStatus.getInstance that happens at the module level +# in submit_job_to_deadline_dialog.py. That call is done at the module level to gather the +# status before the dialog is opened. +from deadline.client.ui.deadline_credentials_status import DeadlineCredentialsStatus + +DeadlineCredentialsStatus.getInstance = Mock(return_value=None) + def configure_mocks(): """Any extra mocking set up required"""