diff --git a/src/service/tests/test_unitary.py b/src/service/tests/test_unitary.py index 54a7a2c55b7729c10333312766a45e1e77e5a880..b8bb0b7ed52d9be19d1eb64f2d7ff005079fc1f9 100644 --- a/src/service/tests/test_unitary.py +++ b/src/service/tests/test_unitary.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -import copy, grpc, logging, pytest +import copy, grpc, json, logging, pytest from common.proto.context_pb2 import ( Context, ContextId, Device, DeviceId, Link, LinkId, Service, ServiceId, Topology, TopologyId) from common.tests.PytestGenerateTests import pytest_generate_tests # (required) pylint: disable=unused-import @@ -39,23 +39,23 @@ class TestServiceHandlers: scenarios = SERVICE_HANDLERS_TO_TEST def test_prepare_environment( - self, service_id, service_descriptor, service_endpoint_ids, service_config_rules, service_constraints, - service_constraints_location, service_constraints_location_new, - contexts, topologies, devices, links, + self, contexts, topologies, devices, links, service_id, service_descriptor, service_endpoint_ids, + service_config_rules, service_constraints, service_constraints_location, service_constraints_location_new, context_client : ContextClient, # pylint: disable=redefined-outer-name device_client : DeviceClient, # pylint: disable=redefined-outer-name service_client : ServiceClient): # pylint: disable=redefined-outer-name for context in contexts: context_client.SetContext(Context(**context)) 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)) def test_service_create_error_cases( - self, service_id, service_descriptor, service_endpoint_ids, service_config_rules, service_constraints, - service_constraints_location, service_constraints_location_new, - contexts, topologies, devices, links, + self, contexts, topologies, devices, links, service_id, service_descriptor, service_endpoint_ids, + service_config_rules, service_constraints, service_constraints_location, service_constraints_location_new, context_client : ContextClient, # pylint: disable=redefined-outer-name device_client : DeviceClient, # pylint: disable=redefined-outer-name service_client : ServiceClient): # pylint: disable=redefined-outer-name