

def test_lookup_true(self):
    qs = mock.Mock(spec=['filter'])
    f = self.test_filter_class(name='somefield')
    result = f.filter(qs, Lookup('somesearch', 'exact'))
    qs.filter.assert_called_once_with(somefield__exact='somesearch')
    self.assertNotEqual(qs, result)

dataset/ETHPy150Open carltongibson/django-filter/tests/test_filters.py CustomFilterWithBooleanCheckTests.test_lookup_true/original