diff --git a/tests/unit/transport/test_tty.py b/tests/unit/transport/test_tty.py index 87f1c2b51..520556e55 100644 --- a/tests/unit/transport/test_tty.py +++ b/tests/unit/transport/test_tty.py @@ -29,6 +29,7 @@ def test_login_bad_password_ConnectAuthError(self): self.terminal.read_prompt = MagicMock() self.terminal.read_prompt.return_value = (None, "badpasswd") self.terminal.write = MagicMock() + self.terminal._tty_close = MagicMock() self.assertRaises(EzErrors.ConnectAuthError, self.terminal._login_state_machine) @patch("jnpr.junos.transport.tty.sleep")