Skip to content

Instantly share code, notes, and snippets.

@bohde
Created August 18, 2012 02:10
Show Gist options
  • Save bohde/3383924 to your computer and use it in GitHub Desktop.
Save bohde/3383924 to your computer and use it in GitHub Desktop.
Test failures
** content_gfk **
E..E
======================================================================
ERROR: test_build_related_resource (content_gfk.tests.fields.ContentTypeFieldTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/joshbohde/code/django-tastypie/tests/content_gfk/tests/fields.py", line 79, in test_build_related_resource
'/api/v1/quotes/%s/' % quote_1.pk
File "/home/joshbohde/code/django-tastypie/tastypie/contrib/contenttypes/fields.py", line 47, in build_related_resource
return super(GenericForeignKeyField, self).build_related_resource(*args, **kwargs)
File "/home/joshbohde/code/django-tastypie/tastypie/fields.py", line 587, in build_related_resource
return self.resource_from_uri(self.fk_resource, value, **kwargs)
File "/home/joshbohde/code/django-tastypie/tastypie/contrib/contenttypes/fields.py", line 38, in resource_from_uri
obj = fk_resource.get_via_uri(uri, request=request)
File "/home/joshbohde/code/django-tastypie/tastypie/contrib/contenttypes/resources.py", line 30, in get_via_uri
parent_resource = view.func_closure[0].cell_contents.func_closure[0].cell_contents.func_closure[0].cell_contents
File "/home/joshbohde/code/django-tastypie/tastypie/resources.py", line 181, in __getattr__
raise AttributeError(name)
AttributeError: func_closure
======================================================================
ERROR: test_resource_from_uri (content_gfk.tests.fields.ContentTypeFieldTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/joshbohde/code/django-tastypie/tests/content_gfk/tests/fields.py", line 61, in test_resource_from_uri
'/api/v1/notes/%s/' % note_2.pk
File "/home/joshbohde/code/django-tastypie/tastypie/contrib/contenttypes/fields.py", line 38, in resource_from_uri
obj = fk_resource.get_via_uri(uri, request=request)
File "/home/joshbohde/code/django-tastypie/tastypie/contrib/contenttypes/resources.py", line 30, in get_via_uri
parent_resource = view.func_closure[0].cell_contents.func_closure[0].cell_contents.func_closure[0].cell_contents
File "/home/joshbohde/code/django-tastypie/tastypie/resources.py", line 181, in __getattr__
raise AttributeError(name)
AttributeError: func_closure
----------------------------------------------------------------------
Ran 4 tests in 0.006s
FAILED (errors=2)
Creating test database for alias 'default'...
Destroying old test database 'default'...
<tastypie.contrib.contenttypes.resources.GenericResource object at 0x31edb50>
<tastypie.contrib.contenttypes.resources.GenericResource object at 0x31ed9d0>
Destroying test database for alias 'default'...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment