示例#1
0
    def test_dictminus(self):
        """Tests the utils.dictminus function"""

        self.assertEqual(
            {'a': 'b', 'c': 'd'},
            utils.dictminus({'a': 'b', 'b': 'c', 'c': 'd'}, 'b', 'd'))
        self.assertEqual(
            {'a': 'b', 'b': 'c', 'c': 'd'},
            utils.dictminus({'a': 'b', 'b': 'c', 'c': 'd'}))
示例#2
0
def create_column(table, name, column=None):
    if column is None:
        return Column(table, name)
    return Column(table, name, **dictminus(column.__dict__, 'name', 'table'))
示例#3
0
def create_column(table, name, column=None):
    if column is None:
        return Column(table, name)
    return Column(table, name, **dictminus(column.__dict__, 'name', 'table'))