Skip to content

Commit

Permalink
[package search tests] Changed test from searching for multiple tags …
Browse files Browse the repository at this point in the history
…to searching for a single multi-word tag.
  • Loading branch information
icmurray committed Nov 15, 2011
1 parent 5a90544 commit d8005ef
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ckan/tests/functional/api/test_package_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,13 @@ def test_09_just_tags(self):
res_dict = self.data_from_res(res)
assert res_dict['count'] == 1, res_dict

def test_10_multiple_tags_with_plus(self):
offset = self.base_url + '?tags=tolstoy+russian&all_fields=1'
def test_10_single_tag_with_plus(self):
from urllib import quote
tagname = "Flexible+" + quote(u'\u0489!'.encode('utf8'))
offset = self.base_url + "?tags=%s&all_fields=1"%tagname
res = self.app.get(offset, status=200)
res_dict = self.data_from_res(res)
assert res_dict['count'] == 1, res_dict
assert res_dict['count'] == 2, res_dict

def test_10_multiple_tags_with_ampersand(self):
offset = self.base_url + '?tags=tolstoy&tags=russian&all_fields=1'
Expand Down

0 comments on commit d8005ef

Please sign in to comment.