

def test_field_params(self):
    with mock.patch.object(Filter, 'field_class', spec=['__call__']) as mocked:
        f = Filter(name='somefield', label='somelabel', widget='somewidget')
        f.field
        mocked.assert_called_once_with(required=False, label='somelabel', widget='somewidget', help_text=mock.ANY)

dataset/ETHPy150Open carltongibson/django-filter/tests/test_filters.py FilterTests.test_field_params/original