From d1d87221d59263a97ca4ae1afc11d1e9f0be051e Mon Sep 17 00:00:00 2001 From: Wei Yen Date: Wed, 22 Feb 2017 06:55:47 +1100 Subject: [PATCH] Regression test to ensure docstring is trimmed Related to issue #418 --- graphene/types/tests/test_objecttype.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/graphene/types/tests/test_objecttype.py b/graphene/types/tests/test_objecttype.py index eb297917..8ccc0fac 100644 --- a/graphene/types/tests/test_objecttype.py +++ b/graphene/types/tests/test_objecttype.py @@ -173,3 +173,14 @@ def test_objecttype_container_benchmark(benchmark): @benchmark def create_objecttype(): 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"