No need to add CONNECTION_HOPS key in connection_hops dict when creating device dynamically in test
@@ -7,6 +7,7 @@ __copyright__ = 'Copyright (C) 2018, Nokia'
__email__ = 'grzegorz.latuszek@nokia.com, marcin.usielski@nokia.com, michal.ernst@nokia.com'
from moler.config import devices as devices_config
+from moler.helpers import copy_dict
from moler.instance_loader import create_instance_from_class_fullname
@@ -38,6 +39,13 @@ class DeviceFactory(object):
if name in cls._devices.keys():
return cls._devices[name]
+ if connection_hops:
+ if "CONNECTION_HOPS" not in connection_hops.keys():
+ new_connection_hops = dict()
+ new_connection_hops["CONNECTION_HOPS"] = connection_hops
+
+ connection_hops = new_connection_hops
+
device_class, connection_desc, connection_hops, initial_state = cls._try_take_named_device_params(name,
device_class,
connection_desc,
