Skip to content

Commit

Permalink
Fix DeprecationWarning in tests (encode#6551)
Browse files Browse the repository at this point in the history
  • Loading branch information
auvipy authored and rpkilby committed Apr 5, 2019
1 parent cceb416 commit 29cbe57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ class SearchListView(generics.ListAPIView):
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'}
Expand Down

0 comments on commit 29cbe57

Please sign in to comment.