def test_line(self, case): self.maxDiff = None line, expected_output = case real_output = Line.parse(line) for key in real_output: if key in JSON_KEYS: value = json.loads(real_output[key]) else: value = real_output[key] self.assertEquals(expected_output[0][key], value) self.assertEquals(set(real_output.keys()), set(expected_output[0].keys()))
def test_schema(self, case): line, expected_output = case real_output = Line.parse(line) self.assertEquals(set(Line.schema), set(real_output.keys()))