예제 #1
0
    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()))
예제 #2
0
    def test_schema(self, case):

        line, expected_output = case
        real_output = Line.parse(line)

        self.assertEquals(set(Line.schema), set(real_output.keys()))