Regression test to ensure docstring is trimmed

Related to issue #418
This commit is contained in:
Wei Yen 2017-02-22 06:55:47 +11:00
parent e2cdd80a5c
commit d1d87221d5

View File

@ -173,3 +173,14 @@ def test_objecttype_container_benchmark(benchmark):
@benchmark @benchmark
def create_objecttype(): def create_objecttype():
Container(field1='field1', field2='field2') Container(field1='field1', field2='field2')
def test_generate_objecttype_description():
class MyObjectType(ObjectType):
'''
Documentation
Documentation line 2
'''
assert MyObjectType._meta.description == "Documentation\n\nDocumentation line 2"