コード例 #1
0
ファイル: test_utils.py プロジェクト: mschoenlaub/dbnavigator
    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
ファイル: column.py プロジェクト: mschoenlaub/dbnavigator
def create_column(table, name, column=None):
    if column is None:
        return Column(table, name)
    return Column(table, name, **dictminus(column.__dict__, "name", "table"))