We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4247151 commit 4b297a2Copy full SHA for 4b297a2
graphene/types/tests/test_enum.py
@@ -64,6 +64,19 @@ def test_enum_from_builtin_enum():
64
assert RGB.GREEN
65
assert RGB.BLUE
66
67
+def test_enum_custom_description_in_constructor():
68
+ description = "An enumeration, but with a custom description"
69
+ RGB = Enum(
70
+ "RGB",
71
+ "RED,GREEN,BLUE",
72
+ description=description,
73
+ )
74
+ assert RGB._meta.description == description
75
+
76
77
+def test_enum_from_python3_enum_uses_default_builtin_doc():
78
+ RGB = Enum("RGB", "RED,GREEN,BLUE")
79
+ assert RGB._meta.description == "An enumeration."
80
81
def test_enum_from_builtin_enum_accepts_lambda_description():
82
def custom_description(value):
0 commit comments