'Ensure that schema generation works for ViewSet classes
with permission classes raising exceptions.'

def test_schema_for_regular_views(self):

    generator = SchemaGenerator(title='Example    API', patterns=self.patterns)
    request = factory.get('/')
    schema = generator.get_schema(Request(request))
    expected = coreapi.Document(url='http://testserver/', title='Example    API', content={'example': {'list': coreapi.Link(url='/example/', action='get', fields=[])}})
    assert (schema == expected)
