

def test_filtering_exclude(self):
    qs = mock.Mock(spec=['exclude'])
    f = BooleanFilter(name='somefield', exclude=True)
    result = f.filter(qs, True)
    qs.exclude.assert_called_once_with(somefield__exact=True)
    self.assertNotEqual(qs, result)

dataset/ETHPy150Open carltongibson/django-filter/tests/test_filters.py BooleanFilterTests.test_filtering_exclude/original