Skip to content

Commit

Permalink
[2223] fix some test only auth ones left
Browse files Browse the repository at this point in the history
  • Loading branch information
kindly committed Mar 23, 2012
1 parent 36fbe55 commit 803cb05
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions ckan/tests/functional/test_authz.py
Expand Up @@ -100,10 +100,7 @@ def _test_via_wui(self, action, user, entity_name, entity='dataset'):
offset = '/%s/list' % entity
elif action == 'create':
offset = '/%s/new' % entity
if entity == 'dataset':
str_required_in_response = 'Add'
else:
str_required_in_response = 'New'
str_required_in_response = 'Add'
elif action == 'delete':
offset = url_for(controller=controller_name, action=model.Action.EDIT, id=unicode(entity_name))
# this is ludicrously sensitive (we have to improve html testing!)
Expand Down
2 changes: 1 addition & 1 deletion ckan/tests/functional/test_group.py
Expand Up @@ -374,7 +374,7 @@ def test_3_new_duplicate_group(self):
fv[prefix+'name'] = group_name
res = fv.submit('save', status=200, extra_environ={'REMOTE_USER': 'russianfan'})
assert 'Group name already exists' in res, res
self.check_tag(res, '<form', 'class="has-errors"')
self.check_tag(res, '<form', 'has-errors')
assert 'class="field_error"' in res, res

def test_new_plugin_hook(self):
Expand Down
4 changes: 2 additions & 2 deletions ckan/tests/functional/test_package.py
Expand Up @@ -76,7 +76,7 @@ class TestPackageBase(FunctionalTestCase):
# on form submission. (But it works in real life.)

def _assert_form_errors(self, res):
self.check_tag(res, '<form', 'class="has-errors"')
self.check_tag(res, '<form', 'has-errors')
assert 'field_error' in res, res

def diff_responses(self, res1, res2):
Expand Down Expand Up @@ -907,7 +907,7 @@ def test_edit_bad_log_message(self):
fv['log_message'] = u'Free enlargements: http://drugs.com/' # spam
res = fv.submit('save')
assert 'Error' in res, res
self.check_tag(res, '<form', 'class="has-errors"')
self.check_tag(res, '<form', 'has-errors')
assert 'No links are allowed' in res, res

def test_edit_bad_name(self):
Expand Down

0 comments on commit 803cb05

Please sign in to comment.