@@ -162,32 +162,32 @@ class Meta:
162162 self .assertIs (F .base_filters ['id__in' ], f )
163163
164164
165- class GetFilterNameTests (TestCase ):
165+ class GetParamFilterNameTests (TestCase ):
166166
167167 def test_regular_filter (self ):
168- name = UserFilter .get_filter_name ('email' )
168+ name = UserFilter .get_param_filter_name ('email' )
169169 self .assertEqual ('email' , name )
170170
171171 def test_exclusion_filter (self ):
172- name = UserFilter .get_filter_name ('email!' )
172+ name = UserFilter .get_param_filter_name ('email!' )
173173 self .assertEqual ('email' , name )
174174
175175 def test_non_filter (self ):
176- name = UserFilter .get_filter_name ('foobar' )
176+ name = UserFilter .get_param_filter_name ('foobar' )
177177 self .assertEqual (None , name )
178178
179179 def test_related_filter (self ):
180180 # 'exact' matches
181- name = NoteFilterWithRelated .get_filter_name ('author' )
181+ name = NoteFilterWithRelated .get_param_filter_name ('author' )
182182 self .assertEqual ('author' , name )
183183
184184 # related attribute filters
185- name = NoteFilterWithRelated .get_filter_name ('author__email' )
185+ name = NoteFilterWithRelated .get_param_filter_name ('author__email' )
186186 self .assertEqual ('author' , name )
187187
188188 # non-existent related filters should match, as it's the responsibility
189189 # of the related filterset to handle non-existent filters
190- name = NoteFilterWithRelated .get_filter_name ('author__foobar' )
190+ name = NoteFilterWithRelated .get_param_filter_name ('author__foobar' )
191191 self .assertEqual ('author' , name )
192192
193193 def test_twice_removed_related_filter (self ):
@@ -199,21 +199,21 @@ class Meta:
199199 model = Post
200200 fields = []
201201
202- name = PostFilterWithDirectAuthor .get_filter_name ('note__title' )
202+ name = PostFilterWithDirectAuthor .get_param_filter_name ('note__title' )
203203 self .assertEqual ('note' , name )
204204
205205 # 'exact' matches, preference more specific filter name, as less specific
206206 # filter may not have related access.
207- name = PostFilterWithDirectAuthor .get_filter_name ('note__author' )
207+ name = PostFilterWithDirectAuthor .get_param_filter_name ('note__author' )
208208 self .assertEqual ('note__author' , name )
209209
210210 # related attribute filters
211- name = PostFilterWithDirectAuthor .get_filter_name ('note__author__email' )
211+ name = PostFilterWithDirectAuthor .get_param_filter_name ('note__author__email' )
212212 self .assertEqual ('note__author' , name )
213213
214214 # non-existent related filters should match, as it's the responsibility
215215 # of the related filterset to handle non-existent filters
216- name = PostFilterWithDirectAuthor .get_filter_name ('note__author__foobar' )
216+ name = PostFilterWithDirectAuthor .get_param_filter_name ('note__author__foobar' )
217217 self .assertEqual ('note__author' , name )
218218
219219 def test_name_hiding (self ):
@@ -226,19 +226,19 @@ class Meta:
226226 model = Post
227227 fields = []
228228
229- name = PostFilterNameHiding .get_filter_name ('note__author' )
229+ name = PostFilterNameHiding .get_param_filter_name ('note__author' )
230230 self .assertEqual ('note__author' , name )
231231
232- name = PostFilterNameHiding .get_filter_name ('note__title' )
232+ name = PostFilterNameHiding .get_param_filter_name ('note__title' )
233233 self .assertEqual ('note' , name )
234234
235- name = PostFilterNameHiding .get_filter_name ('note' )
235+ name = PostFilterNameHiding .get_param_filter_name ('note' )
236236 self .assertEqual ('note' , name )
237237
238- name = PostFilterNameHiding .get_filter_name ('note2' )
238+ name = PostFilterNameHiding .get_param_filter_name ('note2' )
239239 self .assertEqual ('note2' , name )
240240
241- name = PostFilterNameHiding .get_filter_name ('note2__author' )
241+ name = PostFilterNameHiding .get_param_filter_name ('note2__author' )
242242 self .assertEqual ('note2' , name )
243243
244244
0 commit comments