======================================================================
ERROR: test_valid_data_token_update (api.tests.v2.test_token_update.TokenUpdateTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/opt/dev/atmosphere/api/tests/v2/test_token_update.py", line 48, in test_valid_data_token_update
response = self.view(request)
File "/opt/env/atmo/local/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(*args, **kwargs)
File "/opt/env/atmo/local/lib/python2.7/site-packages/rest_framework/viewsets.py", line 83, in view
return self.dispatch(request, *args, **kwargs)
File "/opt/env/atmo/local/lib/python2.7/site-packages/rest_framework/views.py", line 483, in dispatch
response = self.handle_exception(exc)
File "/opt/env/atmo/local/lib/python2.7/site-packages/rest_framework/views.py", line 443, in handle_exception
self.raise_uncaught_exception(exc)
File "/opt/env/atmo/local/lib/python2.7/site-packages/rest_framework/views.py", line 480, in dispatch
response = handler(request, *args, **kwargs)
File "/opt/env/atmo/local/lib/python2.7/site-packages/rest_framework/mixins.py", line 21, in create
self.perform_create(serializer)
File "/opt/env/atmo/local/lib/python2.7/site-packages/rest_framework/mixins.py", line 26, in perform_create
serializer.save()
File "/opt/env/atmo/local/lib/python2.7/site-packages/rest_framework/serializers.py", line 214, in save
self.instance = self.create(validated_data)
File "/opt/dev/atmosphere/api/v2/serializers/post/token_update.py", line 33, in create
identity = self._create_identity(validated_data['provider'], validated_data['username'], validated_data['project_name'], validated_data['token'])
File "/opt/dev/atmosphere/api/v2/serializers/post/token_update.py", line 66, in _create_identity
cred_key=username, cred_ex_project_name=project_name, cred_ex_force_auth_token=token)
File "/opt/dev/atmosphere/core/models/identity.py", line 200, in create_identity
id_membership = identity.share(group, allocation=allocation)
File "/opt/dev/atmosphere/core/models/identity.py", line 131, in share
allocation=allocation)[0]
File "/opt/env/atmo/local/lib/python2.7/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/opt/env/atmo/local/lib/python2.7/site-packages/django/db/models/query.py", line 475, in get_or_create
return self._create_object_from_params(lookup, params)
File "/opt/env/atmo/local/lib/python2.7/site-packages/django/db/models/query.py", line 505, in _create_object_from_params
obj = self.create(**params)
File "/opt/env/atmo/local/lib/python2.7/site-packages/django/db/models/query.py", line 399, in create
obj.save(force_insert=True, using=self.db)
File "/opt/dev/atmosphere/core/models/group.py", line 221, in save
set_provider_quota.apply_async(args=[str(self.identity.uuid)])
File "/opt/env/atmo/local/lib/python2.7/site-packages/celery/app/task.py", line 522, in apply_async
link=link, link_error=link_error, **options)
File "/opt/env/atmo/local/lib/python2.7/site-packages/celery/app/task.py", line 739, in apply
ret = tracer(task_id, args, kwargs, request)
File "/opt/env/atmo/local/lib/python2.7/site-packages/celery/app/trace.py", line 381, in trace_task
I, R, state, retval = on_error(task_request, exc, uuid)
File "/opt/env/atmo/local/lib/python2.7/site-packages/celery/app/trace.py", line 367, in trace_task
R = retval = fun(*args, **kwargs)
File "/opt/dev/atmosphere/service/tasks/admin.py", line 19, in set_provider_quota
set_provider_quota.retry(exc=exc)
File "/opt/env/atmo/local/lib/python2.7/site-packages/celery/app/task.py", line 678, in retry
S.apply().get()
File "/opt/env/atmo/local/lib/python2.7/site-packages/celery/canvas.py", line 192, in apply
return self.type.apply(args, kwargs, **options)
File "/opt/env/atmo/local/lib/python2.7/site-packages/celery/app/task.py", line 739, in apply
ret = tracer(task_id, args, kwargs, request)
File "/opt/env/atmo/local/lib/python2.7/site-packages/celery/app/trace.py", line 381, in trace_task
I, R, state, retval = on_error(task_request, exc, uuid)
File "/opt/env/atmo/local/lib/python2.7/site-packages/celery/app/trace.py", line 367, in trace_task
R = retval = fun(*args, **kwargs)
File "/opt/dev/atmosphere/service/tasks/admin.py", line 19, in set_provider_quota
set_provider_quota.retry(exc=exc)
File "/opt/env/atmo/local/lib/python2.7/site-packages/celery/app/task.py", line 678, in retry
S.apply().get()
File "/opt/env/atmo/local/lib/python2.7/site-packages/celery/canvas.py", line 192, in apply
return self.type.apply(args, kwargs, **options)
File "/opt/env/atmo/local/lib/python2.7/site-packages/celery/app/task.py", line 739, in apply
ret = tracer(task_id, args, kwargs, request)
File "/opt/env/atmo/local/lib/python2.7/site-packages/celery/app/trace.py", line 381, in trace_task
I, R, state, retval = on_error(task_request, exc, uuid)
File "/opt/env/atmo/local/lib/python2.7/site-packages/celery/app/trace.py", line 367, in trace_task
R = retval = fun(*args, **kwargs)
File "/opt/dev/atmosphere/service/tasks/admin.py", line 19, in set_provider_quota
set_provider_quota.retry(exc=exc)
File "/opt/env/atmo/local/lib/python2.7/site-packages/celery/app/task.py", line 678, in retry
S.apply().get()
File "/opt/env/atmo/local/lib/python2.7/site-packages/celery/canvas.py", line 192, in apply
return self.type.apply(args, kwargs, **options)
File "/opt/env/atmo/local/lib/python2.7/site-packages/celery/app/task.py", line 739, in apply
ret = tracer(task_id, args, kwargs, request)
File "/opt/env/atmo/local/lib/python2.7/site-packages/celery/app/trace.py", line 381, in trace_task
I, R, state, retval = on_error(task_request, exc, uuid)
File "/opt/env/atmo/local/lib/python2.7/site-packages/celery/app/trace.py", line 367, in trace_task
R = retval = fun(*args, **kwargs)
File "/opt/dev/atmosphere/service/tasks/admin.py", line 19, in set_provider_quota
set_provider_quota.retry(exc=exc)
File "/opt/env/atmo/local/lib/python2.7/site-packages/celery/app/task.py", line 668, in retry
raise_with_context(exc)
File "/opt/dev/atmosphere/service/tasks/admin.py", line 13, in set_provider_quota
return spq(identity_uuid)
File "/opt/dev/atmosphere/service/quota.py", line 116, in set_provider_quota
return set_openstack_quota(identity)
File "/opt/dev/atmosphere/service/quota.py", line 139, in set_openstack_quota
% identity.provider.get_type_name())
Exception: Cannot set provider quota on type: mock