def test_parse_log_errors(self): line = 'unformatted' with pytest.raises(Exception): utils.parse_log(log_line)
def test_parse_log_value(self, log_line): parsed = utils.parse_log(log_line) assert parsed['value'] == 'VALUE'
def test_parse_log_key(self, log_line): parsed = utils.parse_log(log_line) assert parsed['key'] == 'KEY'
def test_parse_log_message(self, log_line): parsed = utils.parse_log(log_line) assert parsed['message'] == 'KEY=VALUE'
def test_parse_log_type(self, log_line): parsed = utils.parse_log(log_line) assert parsed['type'] == 'TYPE'
def test_parse_log_time(self, log_line): parsed = utils.parse_log(log_line) assert parsed['timestamp'] == 'TIME'