Skip to content

Instantly share code, notes, and snippets.

@jlafon
Last active December 15, 2015 07:39
Show Gist options
  • Save jlafon/5225293 to your computer and use it in GitHub Desktop.
Save jlafon/5225293 to your computer and use it in GitHub Desktop.
======================================================================
ERROR: test_invalid_data (validation.tests.PostNestResouceValidationTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/jharrodlafon/sources/django-tastypie/tests/validation/tests.py", line 56, in test_invalid_data
resp = self.client.post('/api/v1/notes/', data=data, content_type='application/json')
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/test/client.py", line 463, in post
response = super(Client, self).post(path, data=data, content_type=content_type, **extra)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/test/client.py", line 297, in post
return self.request(**r)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/test/client.py", line 424, in request
six.reraise(*exc_info)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 77, in wrapped_view
return view_func(*args, **kwargs)
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 203, in wrapper
response = callback(request, *args, **kwargs)
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 445, in dispatch_list
return self.dispatch('list', request, **kwargs)
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 477, in dispatch
response = method(request, **kwargs)
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 1333, in post_list
updated_bundle = self.obj_create(bundle, **self.remove_api_resource_names(kwargs))
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 2109, in obj_create
bundle = self.full_hydrate(bundle)
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 908, in full_hydrate
setattr(bundle.obj, field_object.attribute, value.obj)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/db/models/fields/related.py", line 313, in __set__
(value, instance._meta.object_name))
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/db/models/base.py", line 421, in __repr__
u = six.text_type(self)
File "/Users/jharrodlafon/sources/django-tastypie/tests/basic/models.py", line 30, in __unicode__
return u"Annotated %s" % self.note.title
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/db/models/fields/related.py", line 389, in __get__
raise self.field.rel.to.DoesNotExist
DoesNotExist
======================================================================
ERROR: test_valid_data (validation.tests.PostNestResouceValidationTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/jharrodlafon/sources/django-tastypie/tests/validation/tests.py", line 42, in test_valid_data
resp = self.client.post('/api/v1/notes/', data=data, content_type='application/json')
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/test/client.py", line 463, in post
response = super(Client, self).post(path, data=data, content_type=content_type, **extra)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/test/client.py", line 297, in post
return self.request(**r)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/test/client.py", line 424, in request
six.reraise(*exc_info)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 77, in wrapped_view
return view_func(*args, **kwargs)
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 203, in wrapper
response = callback(request, *args, **kwargs)
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 445, in dispatch_list
return self.dispatch('list', request, **kwargs)
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 477, in dispatch
response = method(request, **kwargs)
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 1333, in post_list
updated_bundle = self.obj_create(bundle, **self.remove_api_resource_names(kwargs))
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 2109, in obj_create
bundle = self.full_hydrate(bundle)
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 908, in full_hydrate
setattr(bundle.obj, field_object.attribute, value.obj)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/db/models/fields/related.py", line 313, in __set__
(value, instance._meta.object_name))
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/db/models/base.py", line 421, in __repr__
u = six.text_type(self)
File "/Users/jharrodlafon/sources/django-tastypie/tests/basic/models.py", line 30, in __unicode__
return u"Annotated %s" % self.note.title
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/db/models/fields/related.py", line 389, in __get__
raise self.field.rel.to.DoesNotExist
DoesNotExist
======================================================================
ERROR: test_invalid_data (validation.tests.PutListNestResouceValidationTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/jharrodlafon/sources/django-tastypie/tests/validation/tests.py", line 154, in test_invalid_data
resp = self.client.put('/api/v1/notes/', data=data, content_type='application/json')
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/test/client.py", line 494, in put
data=data, content_type=content_type, **extra)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/test/client.py", line 320, in put
return self.generic('PUT', path, data, content_type, **extra)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/test/client.py", line 343, in generic
return self.request(**r)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/test/client.py", line 424, in request
six.reraise(*exc_info)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 77, in wrapped_view
return view_func(*args, **kwargs)
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 203, in wrapper
response = callback(request, *args, **kwargs)
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 445, in dispatch_list
return self.dispatch('list', request, **kwargs)
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 477, in dispatch
response = method(request, **kwargs)
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 1383, in put_list
self.obj_create(bundle=bundle, **self.remove_api_resource_names(kwargs))
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 2109, in obj_create
bundle = self.full_hydrate(bundle)
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 908, in full_hydrate
setattr(bundle.obj, field_object.attribute, value.obj)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/db/models/fields/related.py", line 313, in __set__
(value, instance._meta.object_name))
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/db/models/base.py", line 421, in __repr__
u = six.text_type(self)
File "/Users/jharrodlafon/sources/django-tastypie/tests/basic/models.py", line 30, in __unicode__
return u"Annotated %s" % self.note.title
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/db/models/fields/related.py", line 389, in __get__
raise self.field.rel.to.DoesNotExist
DoesNotExist
======================================================================
ERROR: test_valid_data (validation.tests.PutListNestResouceValidationTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/jharrodlafon/sources/django-tastypie/tests/validation/tests.py", line 130, in test_valid_data
resp = self.client.put('/api/v1/notes/', data=data, content_type='application/json')
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/test/client.py", line 494, in put
data=data, content_type=content_type, **extra)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/test/client.py", line 320, in put
return self.generic('PUT', path, data, content_type, **extra)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/test/client.py", line 343, in generic
return self.request(**r)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/test/client.py", line 424, in request
six.reraise(*exc_info)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/core/handlers/base.py", line 115, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/views/decorators/csrf.py", line 77, in wrapped_view
return view_func(*args, **kwargs)
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 203, in wrapper
response = callback(request, *args, **kwargs)
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 445, in dispatch_list
return self.dispatch('list', request, **kwargs)
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 477, in dispatch
response = method(request, **kwargs)
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 1383, in put_list
self.obj_create(bundle=bundle, **self.remove_api_resource_names(kwargs))
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 2109, in obj_create
bundle = self.full_hydrate(bundle)
File "/Users/jharrodlafon/sources/django-tastypie/tastypie/resources.py", line 908, in full_hydrate
setattr(bundle.obj, field_object.attribute, value.obj)
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/db/models/fields/related.py", line 313, in __set__
(value, instance._meta.object_name))
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/db/models/base.py", line 421, in __repr__
u = six.text_type(self)
File "/Users/jharrodlafon/sources/django-tastypie/tests/basic/models.py", line 30, in __unicode__
return u"Annotated %s" % self.note.title
File "/Users/jharrodlafon/.virtualenv/tastypie-testing/lib/python2.7/site-packages/django/db/models/fields/related.py", line 389, in __get__
raise self.field.rel.to.DoesNotExist
DoesNotExist
----------------------------------------------------------------------
Ran 8 tests in 0.533s
FAILED (errors=4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment