Loading src/service/tests/test_unitary.py +8 −8 Original line number Original line Diff line number Diff line Loading @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # See the License for the specific language governing permissions and # limitations under the License. # limitations under the License. import copy, grpc, logging, pytest import copy, grpc, json, logging, pytest from common.proto.context_pb2 import ( from common.proto.context_pb2 import ( Context, ContextId, Device, DeviceId, Link, LinkId, Service, ServiceId, Topology, TopologyId) Context, ContextId, Device, DeviceId, Link, LinkId, Service, ServiceId, Topology, TopologyId) from common.tests.PytestGenerateTests import pytest_generate_tests # (required) pylint: disable=unused-import from common.tests.PytestGenerateTests import pytest_generate_tests # (required) pylint: disable=unused-import Loading @@ -39,23 +39,23 @@ class TestServiceHandlers: scenarios = SERVICE_HANDLERS_TO_TEST scenarios = SERVICE_HANDLERS_TO_TEST def test_prepare_environment( def test_prepare_environment( self, service_id, service_descriptor, service_endpoint_ids, service_config_rules, service_constraints, self, contexts, topologies, devices, links, service_id, service_descriptor, service_endpoint_ids, service_constraints_location, service_constraints_location_new, service_config_rules, service_constraints, service_constraints_location, service_constraints_location_new, contexts, topologies, devices, links, context_client : ContextClient, # pylint: disable=redefined-outer-name context_client : ContextClient, # pylint: disable=redefined-outer-name device_client : DeviceClient, # pylint: disable=redefined-outer-name device_client : DeviceClient, # pylint: disable=redefined-outer-name service_client : ServiceClient): # pylint: disable=redefined-outer-name service_client : ServiceClient): # pylint: disable=redefined-outer-name for context in contexts: context_client.SetContext(Context(**context)) for context in contexts: context_client.SetContext(Context(**context)) for topology in topologies: context_client.SetTopology(Topology(**topology)) for topology in topologies: context_client.SetTopology(Topology(**topology)) for device in devices: device_client.AddDevice(Device(**device)) for device in devices: LOGGER.warning('device: {:s}'.format(json.dumps(device))) device_client.AddDevice(Device(**device)) for link in links: context_client.SetLink(Link(**link)) for link in links: context_client.SetLink(Link(**link)) def test_service_create_error_cases( def test_service_create_error_cases( self, service_id, service_descriptor, service_endpoint_ids, service_config_rules, service_constraints, self, contexts, topologies, devices, links, service_id, service_descriptor, service_endpoint_ids, service_constraints_location, service_constraints_location_new, service_config_rules, service_constraints, service_constraints_location, service_constraints_location_new, contexts, topologies, devices, links, context_client : ContextClient, # pylint: disable=redefined-outer-name context_client : ContextClient, # pylint: disable=redefined-outer-name device_client : DeviceClient, # pylint: disable=redefined-outer-name device_client : DeviceClient, # pylint: disable=redefined-outer-name service_client : ServiceClient): # pylint: disable=redefined-outer-name service_client : ServiceClient): # pylint: disable=redefined-outer-name Loading Loading
src/service/tests/test_unitary.py +8 −8 Original line number Original line Diff line number Diff line Loading @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # See the License for the specific language governing permissions and # limitations under the License. # limitations under the License. import copy, grpc, logging, pytest import copy, grpc, json, logging, pytest from common.proto.context_pb2 import ( from common.proto.context_pb2 import ( Context, ContextId, Device, DeviceId, Link, LinkId, Service, ServiceId, Topology, TopologyId) Context, ContextId, Device, DeviceId, Link, LinkId, Service, ServiceId, Topology, TopologyId) from common.tests.PytestGenerateTests import pytest_generate_tests # (required) pylint: disable=unused-import from common.tests.PytestGenerateTests import pytest_generate_tests # (required) pylint: disable=unused-import Loading @@ -39,23 +39,23 @@ class TestServiceHandlers: scenarios = SERVICE_HANDLERS_TO_TEST scenarios = SERVICE_HANDLERS_TO_TEST def test_prepare_environment( def test_prepare_environment( self, service_id, service_descriptor, service_endpoint_ids, service_config_rules, service_constraints, self, contexts, topologies, devices, links, service_id, service_descriptor, service_endpoint_ids, service_constraints_location, service_constraints_location_new, service_config_rules, service_constraints, service_constraints_location, service_constraints_location_new, contexts, topologies, devices, links, context_client : ContextClient, # pylint: disable=redefined-outer-name context_client : ContextClient, # pylint: disable=redefined-outer-name device_client : DeviceClient, # pylint: disable=redefined-outer-name device_client : DeviceClient, # pylint: disable=redefined-outer-name service_client : ServiceClient): # pylint: disable=redefined-outer-name service_client : ServiceClient): # pylint: disable=redefined-outer-name for context in contexts: context_client.SetContext(Context(**context)) for context in contexts: context_client.SetContext(Context(**context)) for topology in topologies: context_client.SetTopology(Topology(**topology)) for topology in topologies: context_client.SetTopology(Topology(**topology)) for device in devices: device_client.AddDevice(Device(**device)) for device in devices: LOGGER.warning('device: {:s}'.format(json.dumps(device))) device_client.AddDevice(Device(**device)) for link in links: context_client.SetLink(Link(**link)) for link in links: context_client.SetLink(Link(**link)) def test_service_create_error_cases( def test_service_create_error_cases( self, service_id, service_descriptor, service_endpoint_ids, service_config_rules, service_constraints, self, contexts, topologies, devices, links, service_id, service_descriptor, service_endpoint_ids, service_constraints_location, service_constraints_location_new, service_config_rules, service_constraints, service_constraints_location, service_constraints_location_new, contexts, topologies, devices, links, context_client : ContextClient, # pylint: disable=redefined-outer-name context_client : ContextClient, # pylint: disable=redefined-outer-name device_client : DeviceClient, # pylint: disable=redefined-outer-name device_client : DeviceClient, # pylint: disable=redefined-outer-name service_client : ServiceClient): # pylint: disable=redefined-outer-name service_client : ServiceClient): # pylint: disable=redefined-outer-name Loading