diff --git a/cli/help.py b/cli/help.py index 00ba042..f9709c9 100644 --- a/cli/help.py +++ b/cli/help.py @@ -59,7 +59,7 @@ def help_get_all_appointments(): "NAME:" "\tpython teos_cli get_all_appointments - Gets information about all appointments stored in the tower." "\n\nUSAGE:" - "\tpython teos_cli get_all_appointments" + "\tpython teos_cli.py get_all_appointments" "\n\nDESCRIPTION:" "\n\n\tGets information about all appointments stored in the tower.\n" ) diff --git a/cli/teos_cli.py b/cli/teos_cli.py index c773dcb..a267e3a 100644 --- a/cli/teos_cli.py +++ b/cli/teos_cli.py @@ -180,7 +180,7 @@ def get_all_appointments(teos_url): Gets information about all appointments stored in the tower, if the user requesting the data is an administrator. Args: - get_all_appointments_endpoint (:obj:`str`): the teos endpoint from which all appointments can be retrieved. + teos_url (:obj:`str`): the teos base url. Returns: :obj:`dict` a dictionary containing all the appointments stored by the Responder and Watcher if the tower @@ -193,7 +193,7 @@ def get_all_appointments(teos_url): response = requests.get(url=get_all_appointments_endpoint, timeout=5) if response.status_code != constants.HTTP_OK: - logger.error("The server returned a 'not found' error") + logger.error("The server returned an error", status_code=response.status_code, reason=response.reason) return None response_json = json.dumps(response.json(), indent=4, sort_keys=True) diff --git a/test/cli/unit/test_teos_cli.py b/test/cli/unit/test_teos_cli.py index da6742a..3d175f8 100644 --- a/test/cli/unit/test_teos_cli.py +++ b/test/cli/unit/test_teos_cli.py @@ -5,7 +5,6 @@ import responses from binascii import hexlify from coincurve import PrivateKey from requests.exceptions import ConnectionError, Timeout -from http.client import HTTPException import common.cryptographer from common.logger import Logger