Esempio n. 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'}))
Esempio n. 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"))