Skip to content

Commit

Permalink
[tests]: Small test fixes to keep pace with WUI updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
teajaymars committed Mar 9, 2012
1 parent e6943e4 commit 25b90e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ckan/tests/functional/api/test_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_good_input(self):
result_json = res_json.get('ResultSet').get('Result')
assert len(result_json) == 1, result_json
assert 'Format' in result_json[0], result_json
assert result_json[0].get('Format') == 'CSV'
assert result_json[0].get('Format') == 'csv'

def test_missing_format(self):
offset = self.base_url + '/format_autocomplete?incomplete=incorrectformat'
Expand Down
10 changes: 5 additions & 5 deletions ckan/tests/functional/test_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,6 @@ def test_read(self):
assert name in res
assert anna.version in res
assert anna.url in res
assert cgi.escape(anna.resources[0].url) in res
assert anna.resources[0].description in res
assert 'Some test notes' in res
self.check_named_element(res, 'a',
'http://ckan.net/',
Expand Down Expand Up @@ -374,6 +372,8 @@ def test_read_plugin_hook(self):
plugins.unload(plugin)

def test_resource_list(self):
# TODO restore this test. It doesn't make much sense with the
# present resource list design.
name = 'annakarenina'
cache_url = 'http://thedatahub.org/test_cache_url.csv'
# add a cache_url to the first resource in the package
Expand All @@ -387,8 +387,8 @@ def test_resource_list(self):
# check that the cache url is included on the dataset view page
offset = url_for(controller='package', action='read', id=name)
res = self.app.get(offset)
assert '[cached]'in res
assert cache_url in res
#assert '[cached]'in res
#assert cache_url in res


class TestReadAtRevision(FunctionalTestCase, HtmlCheckMethods):
Expand Down Expand Up @@ -1128,7 +1128,7 @@ def test_new_no_name(self):
# don't set a name
res = fv.submit('save')
assert 'Error' in res, res
assert 'Name: Missing value' in res, res
assert 'URL: Missing value' in res, res
self._assert_form_errors(res)

def test_new_bad_param(self):
Expand Down

0 comments on commit 25b90e6

Please sign in to comment.