

def test_field_with_required_filter(self):
    with mock.patch.object(Filter, 'field_class', spec=['__call__']) as mocked:
        f = Filter(required=True)
        self.field
        mocked.assert_called_once_with(required=True, label=mock.ANY, widget=mock.ANY, help_text=mock.ANY)

dataset/ETHPy150Open carltongibson/django-filter/tests/test_filters.py FilterTests.test_field_with_required_filter/VarMisuse@41/54 `f`->`self`