Skip to content

Commit

Permalink
Updating authors.rst to add myself and adding a test case to test for…
Browse files Browse the repository at this point in the history
… passing __all__
  • Loading branch information
pctestjfarz committed Jan 14, 2019
1 parent ffc2f42 commit 883991f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ Contributors
* Ryan O’Hara - https://github.com/ryan-copperleaf
* webrunners - https://github.com/webrunners
* Simone Pellizzari - https://github.com/simone6021
* Jonathon Farzanfar - https://github.com/pctSW1
12 changes: 12 additions & 0 deletions tests/filtersets/test_django.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,18 @@ class Meta(object):
'id', 'name', 'a', 'content_type', 'object_id',
}

def test_get_filters_using_all(self):
class ModelBFilterSet(ModelFilterSet):
class Meta(object):
model = ModelB
fields = '__all__'

filters = ModelBFilterSet().get_filters()

assert set(filters.keys()) == {
'id', 'name', 'a', 'content_type', 'object_id',
}

def test_get_form_field_for_field(self):
fs = ModelFilterSet()

Expand Down

0 comments on commit 883991f

Please sign in to comment.