Skip to content

Commit

Permalink
Coding Standards fix newly introduced pep8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Apr 24, 2013
1 parent be2ed32 commit 6ee2309
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion ckan/tests/logic/test_init.py
Expand Up @@ -7,4 +7,7 @@
class TestMemberLogic(object):
def test_model_name_to_class(self):
assert logic.model_name_to_class(model, 'package') == model.Package
tools.assert_raises(logic.ValidationError, logic.model_name_to_class, model, 'inexistent_model_name')
tools.assert_raises(logic.ValidationError,
logic.model_name_to_class,
model,
'inexistent_model_name')
7 changes: 4 additions & 3 deletions ckan/tests/logic/test_member.py
Expand Up @@ -31,7 +31,7 @@ def test_member_create_should_update_member_if_it_already_exists(self):
assert initial['capacity'] == u'public'
assert final['capacity'] == u'private'

def test_member_create_raises_if_user_is_unauthorized_to_update_group(self):
def test_member_create_raises_if_user_unauthorized_to_update_group(self):
ctx, dd = self._build_context(self.pkgs[0].id, 'package',
user='unauthorized_user')
assert_raises(logic.NotAuthorized,
Expand Down Expand Up @@ -111,7 +111,7 @@ def test_member_delete_accepts_object_name_or_id(self):
res = self._member_list('user', 'admin')
assert (self.user.id, 'user', 'Admin') not in res, res

def test_member_delete_raises_if_user_is_unauthorized_to_update_group(self):
def test_member_delete_raises_if_user_unauthorized_to_update_group(self):
ctx, dd = self._build_context(self.pkgs[0].id, 'package',
user='unauthorized_user')
assert_raises(logic.NotAuthorized,
Expand Down Expand Up @@ -162,7 +162,8 @@ def _member_delete_in_group(self, obj, obj_type, group_id):
ctx, dd = self._build_context(obj, obj_type, group_id=group_id)
return logic.get_action('member_delete')(ctx, dd)

def _build_context(self, obj, obj_type, capacity='public', group_id=None, user=None):
def _build_context(self, obj, obj_type, capacity='public',
group_id=None, user=None):
ctx = {'model': model,
'session': model.Session,
'user': user or self.user.id}
Expand Down

0 comments on commit 6ee2309

Please sign in to comment.