mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-17 23:14:11 +02:00
lint
This commit is contained in:
parent
39f577c1b4
commit
681963343a
3 changed files with 5 additions and 4 deletions
|
@ -184,7 +184,9 @@ class EPPLibWrapper:
|
||||||
message = f"{cmd_type} failed and will be retried"
|
message = f"{cmd_type} failed and will be retried"
|
||||||
info_message = f"{message} Error: {err}"
|
info_message = f"{message} Error: {err}"
|
||||||
if err.response:
|
if err.response:
|
||||||
info_message = f"{info_message}| cltrid is {err.response.cl_tr_id} svtrid is {err.response.sv_tr_id}"
|
info_message = (
|
||||||
|
f"{info_message}| cltrid is {err.response.cl_tr_id} svtrid is {err.response.sv_tr_id}"
|
||||||
|
)
|
||||||
logger.info(f"{info_message}")
|
logger.info(f"{info_message}")
|
||||||
return self._retry(command)
|
return self._retry(command)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -69,7 +69,6 @@ class RegistryError(Exception):
|
||||||
# note is a string that can be used to provide additional context
|
# note is a string that can be used to provide additional context
|
||||||
self.note = note
|
self.note = note
|
||||||
|
|
||||||
|
|
||||||
def should_retry(self):
|
def should_retry(self):
|
||||||
# COMMAND_USE_ERROR is returning with message, Registrar is not logged in,
|
# COMMAND_USE_ERROR is returning with message, Registrar is not logged in,
|
||||||
# which can be recovered from with a retry
|
# which can be recovered from with a retry
|
||||||
|
|
|
@ -310,10 +310,10 @@ class TestClient(TestCase):
|
||||||
mock_close.assert_called_once()
|
mock_close.assert_called_once()
|
||||||
# send() is called 5 times: send(login), send(command) fail, send(logout), send(login), send(command)
|
# send() is called 5 times: send(login), send(command) fail, send(logout), send(login), send(command)
|
||||||
self.assertEquals(mock_send.call_count, 5)
|
self.assertEquals(mock_send.call_count, 5)
|
||||||
# Assertion proper logging; note that the
|
# Assertion proper logging; note that the
|
||||||
mock_logger.info.assert_called_once_with(
|
mock_logger.info.assert_called_once_with(
|
||||||
"InfoDomainCommand failed and will be retried Error: Registrar is not logging in.| cltrid is cl_tr_id svtrid is sv_tr_id"
|
"InfoDomainCommand failed and will be retried Error: Registrar is not logging in.| cltrid is cl_tr_id svtrid is sv_tr_id"
|
||||||
)
|
)
|
||||||
|
|
||||||
@less_console_noise_decorator
|
@less_console_noise_decorator
|
||||||
def fake_failure_send_concurrent_threads(self, command=None, cleaned=None):
|
def fake_failure_send_concurrent_threads(self, command=None, cleaned=None):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue