'Ensure a view may have a docstring that is actually a lazily evaluated
class that can be converted to a string.
See: https://github.com/encode/django-rest-framework/issues/1708'

def test_view_description_can_be_promise(self):

    @python_2_unicode_compatible
    class MockLazyStr(object, ):
        def __init__(self, string):
            self.s = string
        def __str__(self):
            return self.s
    class MockView(APIView, ):
        __doc__ = MockLazyStr(u'a    gettext    string')
    assert (MockView().get_view_description() == u'a    gettext    string')
