def test_cmd_print_empty(self): """Check that the print command prints an empty string if the log file is empty. """ log_file = Log(logfile='haproxy/tests/files/empty.log') data = log_file.cmd_print() self.assertEqual('', data)
def test_cmd_print(self): """Check that the print command prints the valid lines.""" log_file = Log(logfile='haproxy/tests/files/2_ok_1_invalid.log') data = log_file.cmd_print() self.assertNotEqual('', data) lines = data.split('\n') self.assertEqual(len(lines), 3)
def test_cmd_print_empty(self): """Check that the print command prints an empty string if the log file is empty. """ log_file = Log( logfile='haproxy/tests/files/empty.log', ) data = log_file.cmd_print() self.assertEqual('', data)
def test_cmd_print(self): """Check that the print command prints the valid lines.""" log_file = Log( logfile='haproxy/tests/files/2_ok_1_invalid.log', ) data = log_file.cmd_print() self.assertNotEqual('', data) lines = data.split('\n') self.assertEqual(len(lines), 3)