mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-10 19:56:59 +03:00
Fix DeprecationWarning in tests (#6551)
This commit is contained in:
parent
cceb416098
commit
29cbe574a3
|
@ -172,11 +172,11 @@ class SearchFilterTests(TestCase):
|
|||
search_fields = ('$title', '$text')
|
||||
|
||||
view = SearchListView.as_view()
|
||||
request = factory.get('/', {'search': '^\w{3}$'})
|
||||
request = factory.get('/', {'search': r'^\w{3}$'})
|
||||
response = view(request)
|
||||
assert len(response.data) == 10
|
||||
|
||||
request = factory.get('/', {'search': '^\w{3}$', 'title_only': 'true'})
|
||||
request = factory.get('/', {'search': r'^\w{3}$', 'title_only': 'true'})
|
||||
response = view(request)
|
||||
assert response.data == [
|
||||
{'id': 3, 'title': 'zzz', 'text': 'cde'}
|
||||
|
|
Loading…
Reference in New Issue
Block a user