From a89b7297f1ee98f3b13b14a192067ad5ece31465 Mon Sep 17 00:00:00 2001 From: Vitor Baptista Date: Tue, 8 Apr 2014 15:48:59 -0300 Subject: [PATCH] [#1505] Instead of accessing and then deleting an attribute, simply pop() it. --- ckan/new_tests/factories.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ckan/new_tests/factories.py b/ckan/new_tests/factories.py index 3d63c436743..ae62d583ce8 100644 --- a/ckan/new_tests/factories.py +++ b/ckan/new_tests/factories.py @@ -130,9 +130,8 @@ def _create(cls, target_class, *args, **kwargs): assert False, "Positional args aren't supported, use keyword args." context = { - 'user': kwargs['user']['name'] + 'user': kwargs.pop('user')['name'] } - del kwargs['user'] group_dict = helpers.call_action('group_create', context=context,