From c5fe1efbaf494bb483756e8d7b5b0fd43f30be30 Mon Sep 17 00:00:00 2001 From: FluxxCode Date: Fri, 5 Jan 2024 15:25:47 +0100 Subject: [PATCH] Fix unit test --- test/test_client_wrapper.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/test/test_client_wrapper.py b/test/test_client_wrapper.py index 2b8565c..d6d2a59 100644 --- a/test/test_client_wrapper.py +++ b/test/test_client_wrapper.py @@ -123,22 +123,17 @@ def setUp(self) -> None: def test_login(self): self.__ami_client.login_response = FutureResponseMock( ResponseMock("Error", True)) - self.assertRaises(Exception, self.__client.login, "", "", 1) + self.assertRaises(Exception, self.__client.login, "", "", 1, 1) self.__ami_client.login_response = FutureResponseMock( ResponseMock("Error", False)) - self.assertRaisesRegex( - Exception, - "Unable to login AMI client", - self.__client.login, - "", - "", - 0.01) + self.assertRaisesRegex(Exception, "Unable to login AMI client", self.__client.login, "", "", 0, 0) self.__ami_client.login_response = FutureResponseMock( ResponseMock("Success", False)) self.__client._ClientWrapper__is_login_validated = True - self.__client.login("", "", 0) + self.__client._ClientWrapper__is_asterisk_fully_booted = True + self.__client.login("", "", 0, 0) self.assertEqual(self.__ami_client.logged_in_username, "") self.assertEqual(self.__ami_client.logged_in_secret, "")