def test_resource_from_uri(self):
        note_2 = Note.objects.create(
            title='Generic and such',
            content='Sometimes it is to lorem ipsum'
        )

        gfk_field = GenericForeignKeyField({
            Note: NoteResource,
            Quote: QuoteResource
        }, 'nofield')

        self.assertEqual(
            gfk_field.resource_from_uri(
                gfk_field.to_class(),
                '/api/v1/notes/%s/' % note_2.pk
            ).obj,
            note_2
        )
dataset/ETHPy150Open django-tastypie/django-tastypie/tests/content_gfk/tests/fields.py/ContentTypeFieldTestCase.test_resource_from_uri/original