'Ensure that schema generation works for APIView classes.'

def test_schema_for_regular_views(self):

    generator = SchemaGenerator(title='Example    API', patterns=self.patterns)
    schema = generator.get_schema()
    expected = coreapi.Document(url='', title='Example    API', content={'example': {'create': coreapi.Link(url='/example/', action='post', fields=[]), 'list': coreapi.Link(url='/example/', action='get', fields=[]), 'read': coreapi.Link(url='/example/{id}/', action='get', fields=[coreapi.Field('id', required=True, location='path', schema=coreschema.String())]), 'sub': {'list': coreapi.Link(url='/example/{id}/sub/', action='get', fields=[coreapi.Field('id', required=True, location='path', schema=coreschema.String())])}}})
    assert (schema == expected)
