mirror of
https://github.com/graphql-python/graphene.git
synced 2025-07-16 19:12:21 +03:00
Added tests
This commit is contained in:
parent
42471516c2
commit
4b297a289d
|
@ -64,6 +64,19 @@ def test_enum_from_builtin_enum():
|
|||
assert RGB.GREEN
|
||||
assert RGB.BLUE
|
||||
|
||||
def test_enum_custom_description_in_constructor():
|
||||
description = "An enumeration, but with a custom description"
|
||||
RGB = Enum(
|
||||
"RGB",
|
||||
"RED,GREEN,BLUE",
|
||||
description=description,
|
||||
)
|
||||
assert RGB._meta.description == description
|
||||
|
||||
|
||||
def test_enum_from_python3_enum_uses_default_builtin_doc():
|
||||
RGB = Enum("RGB", "RED,GREEN,BLUE")
|
||||
assert RGB._meta.description == "An enumeration."
|
||||
|
||||
def test_enum_from_builtin_enum_accepts_lambda_description():
|
||||
def custom_description(value):
|
||||
|
|
Loading…
Reference in New Issue
Block a user