From 95044d69c7db8898d263922802cc2ca769fcbdfb Mon Sep 17 00:00:00 2001 From: Ganesh Nalawade Date: Tue, 5 Dec 2017 12:04:48 +0530 Subject: [PATCH] Fix unit test failure for netconf connection plugin (#33547) --- test/runner/requirements/units.txt | 3 --- test/units/plugins/connection/test_netconf.py | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/test/runner/requirements/units.txt b/test/runner/requirements/units.txt index a79acacb0f5..8eefcd00cdd 100644 --- a/test/runner/requirements/units.txt +++ b/test/runner/requirements/units.txt @@ -23,8 +23,5 @@ f5-sdk ; python_version >= '2.7' f5-icontrol-rest ; python_version >= '2.7' deepdiff -# requirement for modules using Netconf protocol -ncclient - # requirement for aci_rest module xmljson diff --git a/test/units/plugins/connection/test_netconf.py b/test/units/plugins/connection/test_netconf.py index af767ecf36d..ffd43b55ed5 100644 --- a/test/units/plugins/connection/test_netconf.py +++ b/test/units/plugins/connection/test_netconf.py @@ -63,7 +63,8 @@ class TestNetconfConnectionClass(unittest.TestCase): self.assertIsNone(conn._manager) self.assertFalse(conn._connected) - def test_netconf__connect(self): + @patch("ansible.plugins.connection.netconf.netconf_loader") + def test_netconf__connect(self, mock_netconf_loader): pc = PlayContext() new_stdin = StringIO()