we are doing immediate processing, let's return the result
This commit is contained in:
Родитель
6273a00680
Коммит
d316e5ee5b
|
@ -52,8 +52,9 @@ class ValidationResource(MarketplaceResource):
|
|||
if not form.is_valid():
|
||||
raise self.form_errors(form)
|
||||
|
||||
bundle.obj = FileUpload.objects.create(user=amo.get_user())
|
||||
tasks.fetch_manifest(form.cleaned_data['manifest'], bundle.obj.pk)
|
||||
upload = FileUpload.objects.create(user=amo.get_user())
|
||||
tasks.fetch_manifest(form.cleaned_data['manifest'], upload.pk)
|
||||
bundle.obj = FileUpload.objects.get(pk=upload.pk)
|
||||
log.info('Validation created: %s' % bundle.obj.pk)
|
||||
return bundle
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ class TestAddValidationHandler(ValidationHandler):
|
|||
res = self.create()
|
||||
eq_(res.status_code, 201) # Note! This should be a 202.
|
||||
content = json.loads(res.content)
|
||||
eq_(content['processed'], True)
|
||||
obj = FileUpload.objects.get(uuid=content['id'])
|
||||
eq_(obj.user, self.user)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче