def test_filterdict(self): d1 = {1: 2, 3: 4, 5: 6, 7: 8} DictUtils.assert_dicts_equal(DictUtils.filterdict(d1, {1, 2, 3}), { 1: 2, 3: 4 })