From 29cbe574a384c3bcc09434a3a9c5ff0cb7576b99 Mon Sep 17 00:00:00 2001 From: Asif Saif Uddin Date: Sat, 6 Apr 2019 03:27:07 +0600 Subject: [PATCH] Fix DeprecationWarning in tests (#6551) --- tests/test_filters.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_filters.py b/tests/test_filters.py index 088d25436..a53fa192a 100644 --- a/tests/test_filters.py +++ b/tests/test_filters.py @@ -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'}