Skip to content

Commit

Permalink
[#2724] Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Read committed Nov 5, 2015
1 parent 34e1e3f commit 7a0ebbd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions ckan/tests/logic/action/test_get.py
Expand Up @@ -877,7 +877,7 @@ def test_bad_solr_parameter(self):
# depending on the solr version.

def test_facets(self):
org = factories.Organization()
org = factories.Organization(name='test-org-facet', title='Test Org')
factories.Dataset(owner_org=org['id'])
factories.Dataset(owner_org=org['id'])

Expand All @@ -887,13 +887,13 @@ def test_facets(self):
eq(search_result['count'], 2)
eq(search_result['search_facets'],
{'organization': {'items': [{'count': 2,
'display_name': u'Test Organization',
'name': 'test_org_0'}],
'display_name': u'Test Org',
'name': 'test-org-facet'}],
'title': 'organization'}})

def test_facet_limit(self):
group1 = factories.Group()
group2 = factories.Group()
group1 = factories.Group(name='test-group-fl1', title='Test Group 1')
group2 = factories.Group(name='test-group-fl2', title='Test Group 2')
factories.Dataset(groups=[{'name': group1['name']},
{'name': group2['name']}])
factories.Dataset(groups=[{'name': group1['name']}])
Expand All @@ -906,8 +906,8 @@ def test_facet_limit(self):
eq(len(search_result['search_facets']['groups']['items']), 1)
eq(search_result['search_facets'],
{'groups': {'items': [{'count': 2,
'display_name': u'Test Group 0',
'name': 'test_group_0'}],
'display_name': u'Test Group 1',
'name': 'test-group-fl1'}],
'title': 'groups'}})

def test_facet_no_limit(self):
Expand Down

0 comments on commit 7a0ebbd

Please sign in to comment.