diff --git a/tests/unit/test_console.py b/tests/unit/test_console.py index 965a8debc..287a69326 100644 --- a/tests/unit/test_console.py +++ b/tests/unit/test_console.py @@ -24,6 +24,14 @@ class TestConsole(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.open = tty_netconf.open + + @classmethod + def tearDownClass(cls): + tty_netconf.open = cls.open + @patch("jnpr.junos.transport.tty_telnet.Telnet._tty_open") @patch("jnpr.junos.transport.tty_telnet.telnetlib.Telnet.expect") @patch("jnpr.junos.transport.tty_telnet.Telnet.write")