def test_clients_check_status_ae(self): """Test case for piaplib.lint.clients_check_status with show_client("1.2.3.4", *, *, "JUNK")""" theResult = False from .context import piaplib from piaplib import lint as lint from lint import clients_check_status as clients_check_status for depends in [piaplib, lint, clients_check_status]: if depends.__name__ is None: theResult = False try: self.assertIsNotNone( clients_check_status.show_client("1.2.3.4", False, False, "JUNK")) self.assertIsNotNone( clients_check_status.show_client("1.2.3.4", False, True, "JUNK")) self.assertIsNotNone( clients_check_status.show_client("1.2.3.4", True, False, "JUNK")) temp = clients_check_status.show_client("1.2.3.4", True, True, "JUNK") self.assertIsNotNone(temp) self.assertIsInstance(temp, str, "Test output is NOT a string") theResult = isinstance(temp, str) except Exception as err: print(str("")) print(str(type(err))) print(str(err)) print(str((err.args))) print(str("")) err = None del err theResult = False assert theResult
def test_clients_check_status_ab(self): """Test case for piaplib.lint.clients_check_status with show_client("1.2.3.4", True, False, "eth0")""" theResult = False from .context import piaplib from piaplib import lint as lint from piaplib import pku as pku from pku import interfaces as interfaces from lint import clients_check_status as clients_check_status for depends in [piaplib, pku, interfaces, lint, clients_check_status]: if depends.__name__ is None: theResult = False try: temp = clients_check_status.show_client( "1.2.3.4", True, False, interfaces.INTERFACE_CHOICES[0]) self.assertIsNotNone(temp) self.assertIsInstance(temp, str, "Test output is Not a string") theResult = isinstance(temp, str) except Exception as err: print(str("")) print(str(type(err))) print(str(err)) print(str((err.args))) print(str("")) err = None del err theResult = False assert theResult