Skip to content

Commit

Permalink
Enable and fix TestSearch.test_order_by
Browse files Browse the repository at this point in the history
  • Loading branch information
vitorbaptista committed Jul 31, 2013
1 parent ba9f605 commit 0bd8375
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions ckan/tests/lib/test_solr_package_search.py
Expand Up @@ -218,28 +218,11 @@ def test_pagination(self):
assert pkgs == all_pkgs[4:6]

def test_order_by(self):
# TODO: fix this test
#
# as we are not using the 'edismax' query parser now (requires solr >= 3.*), the
# search weighting has been changed
from nose import SkipTest
raise SkipTest()

# large search
all_results = search.query_for(model.Package).run({'q': self.q_all})
all_pkgs = all_results['results']
all_pkg_count = all_results['count']

# rank
query = {
'q': 'government',
'sort': 'rank'
}
result = search.query_for(model.Package).run(query)
pkgs = result['results']
fields = [model.Package.by_name(pkg_name).name for pkg_name in pkgs]
assert fields[0] == 'gils', fields # has government in tags, title and notes

# name
query = {
'q': self.q_all,
Expand Down

0 comments on commit 0bd8375

Please sign in to comment.