Loading src/opticalattackdetector/tests/test_unitary.py +0 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ from opticalattackdetector.service.OpticalAttackDetectorService import \ # from .example_objects import CONTEXT_ID, CONTEXT_ID_2, SERVICE_DEV1_DEV2 LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) @pytest.fixture(scope="session") Loading src/opticalattackmanager/tests/test_unitary.py +18 −17 Original line number Diff line number Diff line Loading @@ -13,26 +13,27 @@ # limitations under the License. import logging import os from unittest.mock import patch import uuid import pytest from opticalattackmanager.utils.monitor import delegate_services from common.Constants import (DEFAULT_GRPC_GRACE_PERIOD, DEFAULT_GRPC_MAX_WORKERS, DEFAULT_SERVICE_GRPC_PORTS, ServiceNameEnum) from common.proto import dbscanserving_pb2 as dbscan from common.proto.optical_attack_detector_pb2 import DetectionRequest from opticalattackdetector.client.OpticalAttackDetectorClient import \ OpticalAttackDetectorClient from opticalattackdetector.service.OpticalAttackDetectorService import \ OpticalAttackDetectorService # from .example_objects import CONTEXT_ID, CONTEXT_ID_2, SERVICE_DEV1_DEV2 LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) def test_detect_attack(): LOGGER.info("placeholder") def test_delegate_services(): service_list = [ { "context": uuid.uuid4(), "service": uuid.uuid4(), "kpi": 10, } for _ in range(10)] delegate_services( service_list=service_list, start_index=0, end_index=9, host="127.0.0.1", port="10006", monitoring_interval=10, ) Loading
src/opticalattackdetector/tests/test_unitary.py +0 −1 Original line number Diff line number Diff line Loading @@ -31,7 +31,6 @@ from opticalattackdetector.service.OpticalAttackDetectorService import \ # from .example_objects import CONTEXT_ID, CONTEXT_ID_2, SERVICE_DEV1_DEV2 LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) @pytest.fixture(scope="session") Loading
src/opticalattackmanager/tests/test_unitary.py +18 −17 Original line number Diff line number Diff line Loading @@ -13,26 +13,27 @@ # limitations under the License. import logging import os from unittest.mock import patch import uuid import pytest from opticalattackmanager.utils.monitor import delegate_services from common.Constants import (DEFAULT_GRPC_GRACE_PERIOD, DEFAULT_GRPC_MAX_WORKERS, DEFAULT_SERVICE_GRPC_PORTS, ServiceNameEnum) from common.proto import dbscanserving_pb2 as dbscan from common.proto.optical_attack_detector_pb2 import DetectionRequest from opticalattackdetector.client.OpticalAttackDetectorClient import \ OpticalAttackDetectorClient from opticalattackdetector.service.OpticalAttackDetectorService import \ OpticalAttackDetectorService # from .example_objects import CONTEXT_ID, CONTEXT_ID_2, SERVICE_DEV1_DEV2 LOGGER = logging.getLogger(__name__) LOGGER.setLevel(logging.DEBUG) def test_detect_attack(): LOGGER.info("placeholder") def test_delegate_services(): service_list = [ { "context": uuid.uuid4(), "service": uuid.uuid4(), "kpi": 10, } for _ in range(10)] delegate_services( service_list=service_list, start_index=0, end_index=9, host="127.0.0.1", port="10006", monitoring_interval=10, )