Skip to content

Commit

Permalink
[#3022] Fix failing test due to default package type
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Dec 20, 2012
1 parent e0984a7 commit 3163bfc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
9 changes: 4 additions & 5 deletions ckan/tests/lib/test_dictization.py
Expand Up @@ -68,7 +68,7 @@ def setup_class(cls):
'organization': None,
'maintainer': None,
'maintainer_email': None,
'type': None,
'type': u'dataset',
'name': u'annakarenina',
'notes': u'Some test notes\n\n### A 3rd level heading\n\n**Some bolded text.**\n\n*Some italicized text.*\n\nForeign characters:\nu with umlaut \xfc\n66-style quote \u201c\nforeign word: th\xfcmb\n\nNeeds escaping:\nleft arrow <\n\n<http://ckan.net/>\n\n',
'relationships_as_object': [],
Expand Down Expand Up @@ -175,7 +175,7 @@ def test_01_dictize_main_objects_simple(self):
'notes': u'Some test notes\n\n### A 3rd level heading\n\n**Some bolded text.**\n\n*Some italicized text.*\n\nForeign characters:\nu with umlaut \xfc\n66-style quote \u201c\nforeign word: th\xfcmb\n\nNeeds escaping:\nleft arrow <\n\n<http://ckan.net/>\n\n',
'state': u'active',
'title': u'A Novel By Tolstoy',
'type': None,
'type': u'dataset',
'url': u'http://www.annakarenina.com',
'owner_org': None,
'private': False,
Expand Down Expand Up @@ -932,7 +932,7 @@ def test_16_group_dictized(self):
'license_id': u'other-open',
'maintainer': None,
'maintainer_email': None,
'type': None,
'type': u'dataset',
'name': u'annakarenina3',
'notes': u'Some test notes\n\n### A 3rd level heading\n\n**Some bolded text.**\n\n*Some italicized text.*\n\nForeign characters:\nu with umlaut \xfc\n66-style quote \u201c\nforeign word: th\xfcmb\n\nNeeds escaping:\nleft arrow <\n\n<http://ckan.net/>\n\n',
'state': u'active',
Expand All @@ -949,7 +949,7 @@ def test_16_group_dictized(self):
'license_id': u'other-open',
'maintainer': None,
'maintainer_email': None,
'type': None,
'type': u'dataset',
'name': u'annakarenina2',
'notes': u'Some test notes\n\n### A 3rd level heading\n\n**Some bolded text.**\n\n*Some italicized text.*\n\nForeign characters:\nu with umlaut \xfc\n66-style quote \u201c\nforeign word: th\xfcmb\n\nNeeds escaping:\nleft arrow <\n\n<http://ckan.net/>\n\n',
'state': u'active',
Expand All @@ -962,7 +962,6 @@ def test_16_group_dictized(self):
'approval_status': u'approved',
'title': u'help',
'type': u'group'}

expected['packages'] = sorted(expected['packages'], key=lambda x: x['name'])
result = self.remove_changable_columns(group_dictized)
result['packages'] = sorted(result['packages'], key=lambda x: x['name'])
Expand Down
1 change: 1 addition & 0 deletions ckan/tests/lib/test_dictization_schema.py
Expand Up @@ -81,6 +81,7 @@ def test_1_package_schema(self):
}],
'license_id': u'other-open',
'name': u'anna2',
'type': u'dataset',
'notes': u'Some test notes\n\n### A 3rd level heading\n\n**Some bolded text.**\n\n*Some italicized text.*\n\nForeign characters:\nu with umlaut \xfc\n66-style quote \u201c\nforeign word: th\xfcmb\n\nNeeds escaping:\nleft arrow <\n\n<http://ckan.net/>\n\n',
'resources': [{'alt_url': u'alt123',
'description': u'Full text. Needs escaping: " Umlaut: \xfc',
Expand Down
3 changes: 3 additions & 0 deletions ckan/tests/lib/test_solr_search_index.py
Expand Up @@ -60,6 +60,7 @@ def test_index(self):
'id': u'penguin-id',
'title': u'penguin',
'state': u'active',
'type': u'dataset',
'private': False,
'owner_org': None,
'metadata_created': datetime_now.isoformat(),
Expand Down Expand Up @@ -89,6 +90,7 @@ def test_index_clear(self):
'id': u'penguin-id',
'title': u'penguin',
'state': u'active',
'type': u'dataset',
'private': False,
'owner_org': None,
'metadata_created': datetime.now().isoformat(),
Expand All @@ -112,6 +114,7 @@ def test_index_illegal_xml_chars(self):
'title': u'\u00c3a\u0001ltimo n\u00famero penguin',
'notes': u'\u00c3a\u0001ltimo n\u00famero penguin',
'state': u'active',
'type': u'dataset',
'private': False,
'owner_org': None,
'metadata_created': datetime.now().isoformat(),
Expand Down

0 comments on commit 3163bfc

Please sign in to comment.