Commit 6b5e39e3 authored by Okhin's avatar Okhin
Browse files

We don't need to replace ' ' by '+' in our tests

parent f3338348
Pipeline #2572 failed with stages
in 46 seconds
...@@ -116,9 +116,8 @@ class TestArticleApi(TestCase): ...@@ -116,9 +116,8 @@ class TestArticleApi(TestCase):
assert r.data['count'] == 0 assert r.data['count'] == 0
def test_api_filter_search(self): def test_api_filter_search(self):
text = '+'.join(self.articles[0].extracts.split(' ')[:10]) text = ' '.join(self.articles[0].extracts.split(' '))
r = self.client.get('/api/articles-search/{}/'.format(text)) r = self.client.get('/api/articles-search/{}/'.format(text))
print(r.data)
assert r.status_code == 200 assert r.status_code == 200
assert r.data['count'] == 1 assert r.data['count'] == 1
assert r.data['results'][0]['id'] == self.articles[0].id assert r.data['results'][0]['id'] == self.articles[0].id
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment