From 6d5503bd6e3b94c753fdf351b67b4c7f740c35b9 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 19 Sep 2022 08:00:00 -0400 Subject: [PATCH] Agent: Move IslandAPIClient to island_api_client package --- monkey/infection_monkey/island_api_client/__init__.py | 7 +++++++ .../{transport => island_api_client}/island_api_client.py | 0 .../island_api_client_errors.py | 0 monkey/infection_monkey/transport/__init__.py | 7 ------- .../infection_monkey/island_api_client/__init__.py | 0 .../test_island_api_client.py | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) rename monkey/infection_monkey/{transport => island_api_client}/island_api_client.py (100%) rename monkey/infection_monkey/{transport => island_api_client}/island_api_client_errors.py (100%) create mode 100644 monkey/tests/unit_tests/infection_monkey/island_api_client/__init__.py rename monkey/tests/unit_tests/infection_monkey/{transport => island_api_client}/test_island_api_client.py (93%) diff --git a/monkey/infection_monkey/island_api_client/__init__.py b/monkey/infection_monkey/island_api_client/__init__.py index 5f8a1c5d5..957e734ef 100644 --- a/monkey/infection_monkey/island_api_client/__init__.py +++ b/monkey/infection_monkey/island_api_client/__init__.py @@ -1 +1,8 @@ +from .island_api_client_errors import ( + IslandAPIConnectionError, + IslandAPIError, + IslandAPIRequestFailedError, + IslandAPITimeoutError, +) from .i_island_api_client import IIslandAPIClient +from .island_api_client import IslandAPIClient diff --git a/monkey/infection_monkey/transport/island_api_client.py b/monkey/infection_monkey/island_api_client/island_api_client.py similarity index 100% rename from monkey/infection_monkey/transport/island_api_client.py rename to monkey/infection_monkey/island_api_client/island_api_client.py diff --git a/monkey/infection_monkey/transport/island_api_client_errors.py b/monkey/infection_monkey/island_api_client/island_api_client_errors.py similarity index 100% rename from monkey/infection_monkey/transport/island_api_client_errors.py rename to monkey/infection_monkey/island_api_client/island_api_client_errors.py diff --git a/monkey/infection_monkey/transport/__init__.py b/monkey/infection_monkey/transport/__init__.py index c9b793a50..960bce311 100644 --- a/monkey/infection_monkey/transport/__init__.py +++ b/monkey/infection_monkey/transport/__init__.py @@ -1,8 +1 @@ from infection_monkey.transport.http import LockedHTTPServer -from .island_api_client_errors import ( - IslandAPIConnectionError, - IslandAPIError, - IslandAPIRequestFailedError, - IslandAPITimeoutError, -) -from .island_api_client import IslandAPIClient diff --git a/monkey/tests/unit_tests/infection_monkey/island_api_client/__init__.py b/monkey/tests/unit_tests/infection_monkey/island_api_client/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/monkey/tests/unit_tests/infection_monkey/transport/test_island_api_client.py b/monkey/tests/unit_tests/infection_monkey/island_api_client/test_island_api_client.py similarity index 93% rename from monkey/tests/unit_tests/infection_monkey/transport/test_island_api_client.py rename to monkey/tests/unit_tests/infection_monkey/island_api_client/test_island_api_client.py index 513a8a3e0..0e1d7412b 100644 --- a/monkey/tests/unit_tests/infection_monkey/transport/test_island_api_client.py +++ b/monkey/tests/unit_tests/infection_monkey/island_api_client/test_island_api_client.py @@ -2,7 +2,7 @@ import pytest import requests import requests_mock -from infection_monkey.transport import ( +from infection_monkey.island_api_client import ( IslandAPIClient, IslandAPIConnectionError, IslandAPIError,