diff --git a/test/junos/conftest.py b/test/junos/conftest.py index cca77f03e..a0a057328 100644 --- a/test/junos/conftest.py +++ b/test/junos/conftest.py @@ -10,6 +10,8 @@ from napalm.junos import junos +from ncclient.devices.junos import JunosDeviceHandler + @pytest.fixture(scope="class") def set_device_parameters(request): @@ -82,6 +84,15 @@ def __init__(self): # disable it to use the DOM parser which was used prior. self._use_filter = False + @property + def transform(self): + # Junos device transform, inherited from the ncclient class + return self._conn._device_handler.transform_reply + + @transform.setter + def transform(self, func): + self._conn._device_handler.transform_reply = func + @property def facts(self): # we want to reinitialize it every time to avoid side effects @@ -183,6 +194,7 @@ class FakeConnection: def __init__(self, rpc): self.rpc = FakeConnectionRPCObject(rpc) self._session = FakeSession() + self._device_handler = JunosDeviceHandler({}) class FakeSession: