summaryrefslogtreecommitdiffstats
path: root/app/test
diff options
context:
space:
mode:
Diffstat (limited to 'app/test')
-rw-r--r--app/test/event_based_scan/test_port_add.py7
-rw-r--r--app/test/event_based_scan/test_subnet_add.py4
-rw-r--r--app/test/scan/test_scan_controller.py9
3 files changed, 8 insertions, 12 deletions
diff --git a/app/test/event_based_scan/test_port_add.py b/app/test/event_based_scan/test_port_add.py
index 58926a9..caa8401 100644
--- a/app/test/event_based_scan/test_port_add.py
+++ b/app/test/event_based_scan/test_port_add.py
@@ -7,14 +7,9 @@
# which accompanies this distribution, and is available at #
# http://www.apache.org/licenses/LICENSE-2.0 #
###############################################################################
-from unittest.mock import MagicMock, patch
+from unittest.mock import patch
from discover.events.event_port_add import EventPortAdd
-from discover.fetchers.api.api_fetch_host_instances import ApiFetchHostInstances
-from discover.fetchers.cli.cli_fetch_instance_vnics import CliFetchInstanceVnics
-from discover.find_links_for_instance_vnics import FindLinksForInstanceVnics
-from discover.find_links_for_vedges import FindLinksForVedges
-from discover.scanner import Scanner
from test.event_based_scan.test_data.event_payload_port_add import \
EVENT_PAYLOAD_PORT_INSTANCE_ADD, NETWORK_DOC, \
INSTANCE_DOC, INSTANCES_ROOT, VNIC_DOCS, INSTANCE_DOCS, PORTS_FOLDER, \
diff --git a/app/test/event_based_scan/test_subnet_add.py b/app/test/event_based_scan/test_subnet_add.py
index ce934f3..b9145a5 100644
--- a/app/test/event_based_scan/test_subnet_add.py
+++ b/app/test/event_based_scan/test_subnet_add.py
@@ -7,12 +7,10 @@
# which accompanies this distribution, and is available at #
# http://www.apache.org/licenses/LICENSE-2.0 #
###############################################################################
-from unittest.mock import MagicMock, patch
+from unittest.mock import patch
from discover.events.event_subnet_add import EventSubnetAdd
from discover.fetchers.api.api_access import ApiAccess
-from discover.find_links_for_pnics import FindLinksForPnics
-from discover.find_links_for_vservice_vnics import FindLinksForVserviceVnics
from test.event_based_scan.test_data.event_payload_subnet_add import \
EVENT_PAYLOAD_SUBNET_ADD, \
EVENT_PAYLOAD_REGION, NETWORK_DOC, HOST_DOC, PORT_DOC
diff --git a/app/test/scan/test_scan_controller.py b/app/test/scan/test_scan_controller.py
index f3bcc9a..f903e11 100644
--- a/app/test/scan/test_scan_controller.py
+++ b/app/test/scan/test_scan_controller.py
@@ -140,20 +140,23 @@ class TestScanController(TestScan):
deploy_monitoring_setup_count)
def prepare_scan_mocks(self):
- self.load_metadata = Scanner.load_metadata
+ self.load_link_finders_metadata = Scanner.load_scanners_metadata
+ self.load_scanners_metadata = Scanner.load_scanners_metadata
self.scan = Scanner.scan
self.scan_links = Scanner.scan_links
self.scan_cliques = Scanner.scan_cliques
self.deploy_monitoring_setup = Scanner.deploy_monitoring_setup
- Scanner.load_metadata = MagicMock()
+ Scanner.load_link_finders_metadata = MagicMock()
+ Scanner.load_scanners_metadata = MagicMock()
Scanner.scan = MagicMock()
Scanner.scan_links = MagicMock()
Scanner.scan_cliques = MagicMock()
Scanner.deploy_monitoring_setup = MagicMock()
def reset_methods(self):
- Scanner.load_metadata = self.load_metadata
+ Scanner.load_link_finders_metadata = self.load_link_finders_metadata
+ Scanner.load_scanners_metadata = self.load_scanners_metadata
Scanner.scan = self.scan
Scanner.scan_links = self.scan_links
Scanner.scan_cliques = self.scan_cliques