diff --git a/src/registrar/tests/common.py b/src/registrar/tests/common.py index d1021f45c..5df54de76 100644 --- a/src/registrar/tests/common.py +++ b/src/registrar/tests/common.py @@ -791,6 +791,8 @@ class MockEppLib(TestCase): return self.mockInfoDomainCommands(_request, cleaned) elif isinstance(_request, commands.InfoContact): return self.mockInfoContactCommands(_request, cleaned) + elif isinstance(_request, commands.UpdateDomain): + return self.mockUpdateDomainCommands(_request, cleaned) elif ( isinstance(_request, commands.CreateContact) and getattr(_request, "id", None) == "fail" @@ -809,16 +811,6 @@ class MockEppLib(TestCase): res_data=[self.mockDataHostChange], code=ErrorCode.COMMAND_COMPLETED_SUCCESSFULLY, ) - elif ( - isinstance(_request, commands.UpdateDomain) - and getattr(_request, "name", None) == "dnssec-invalid.gov" - ): - raise RegistryError(code=ErrorCode.PARAMETER_VALUE_RANGE_ERROR) - elif isinstance(_request, commands.UpdateDomain): - return MagicMock( - res_data=[self.mockDataHostChange], - code=ErrorCode.COMMAND_COMPLETED_SUCCESSFULLY, - ) elif isinstance(_request, commands.DeleteHost): return MagicMock( res_data=[self.mockDataHostChange], @@ -836,6 +828,15 @@ class MockEppLib(TestCase): ) return MagicMock(res_data=[self.mockDataInfoHosts]) + def mockUpdateDomainCommands(self, _request, cleaned): + if getattr(_request, "name", None) == "dnssec-invalid.gov": + raise RegistryError(code=ErrorCode.PARAMETER_VALUE_RANGE_ERROR) + else: + return MagicMock( + res_data=[self.mockDataHostChange], + code=ErrorCode.COMMAND_COMPLETED_SUCCESSFULLY, + ) + def mockInfoDomainCommands(self, _request, cleaned): if getattr(_request, "name", None) == "security.gov": return MagicMock(res_data=[self.infoDomainNoContact])