Skip to content

Commit

Permalink
[#2750] Fix tag editing test in example_idatasetform
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Hammond committed Mar 5, 2013
1 parent aeb2687 commit 04d0a74
Showing 1 changed file with 3 additions and 4 deletions.
Expand Up @@ -82,7 +82,7 @@ def test_example_idatasetform_plugin(self):

# Fill out the form and submit it, changing the country_code value.
form = response.forms[1]
#form['tag_string'] = 'testing, idatasetform, test_update_tag'
form['tag_string'] = 'testing, idatasetform, test_update_tag'
form['country_code'] = 'fr'
response = form.submit('save', extra_environ=extra_environ)
assert response.status == 302
Expand All @@ -97,9 +97,8 @@ def test_example_idatasetform_plugin(self):
# FIXME: Tags aren't shown on the dataset read page, so check them
# another way.
# TODO: Also edit some other fields and check their values.
assert '<a href="/tag/idatasetform">idatasetform</a>' in response
assert '<a href="/tag/testing">testing</a>' in response
assert '<a href="/tag/test_update_tag">test_update_tag</a>' in response
for tag in ('test_update_tag', 'idatasetform', 'testing'):
assert 'href="/dataset?tags={0}"'.format(tag) in response

# Fetch the dataset search page, just to test that the plugin's
# search_template() method gets called.
Expand Down

0 comments on commit 04d0a74

Please sign in to comment.