示例#1
0
    def runTest(self):
        selected_cols = set(['a', 'b', 'd'])
        table_schema = Schema(type='object',
                              properties={
                                  'a': Schema(None, inclusion='available'),
                                  'b': Schema(None, inclusion='unsupported'),
                                  'c': Schema(None, inclusion='automatic')})

        got_cols = tap_mysql.desired_columns(selected_cols, table_schema)

        self.assertEqual(got_cols,
                         set(['a', 'c']),
                         'Keep automatic as well as selected, available columns.')
示例#2
0
    def runTest(self):
        selected_cols = set(["a", "b", "d"])
        table_schema = Schema(
            type="object",
            properties={
                "a": Schema(None, inclusion="available"),
                "b": Schema(None, inclusion="unsupported"),
                "c": Schema(None, inclusion="automatic"),
            },
        )

        got_cols = tap_mysql.desired_columns(selected_cols, table_schema)

        self.assertEqual(
            got_cols, set(["a", "c"]),
            "Keep automatic as well as selected, available columns.")