mirror of
https://github.com/graphql-python/graphene.git
synced 2025-09-21 19:32:33 +03:00
Add tests for description, deprecation_reason arguments of NodeField
This commit is contained in:
parent
87462306cb
commit
2c0e044e2a
|
@ -110,10 +110,15 @@ def test_node_field_custom():
|
||||||
assert node_field.node_type == Node
|
assert node_field.node_type == Node
|
||||||
|
|
||||||
|
|
||||||
def test_node_field_custom_name():
|
def test_node_field_args():
|
||||||
name = "my_named_node"
|
field_args = {
|
||||||
named_node_field = Node.Field(name=name)
|
"name": "my_custom_name",
|
||||||
assert named_node_field.name == name
|
"description": "my_custom_description",
|
||||||
|
"deprecation_reason": "my_custom_deprecation_reason"
|
||||||
|
}
|
||||||
|
node_field = Node.Field(**field_args)
|
||||||
|
for field_arg, value in field_args.items():
|
||||||
|
assert getattr(node_field, field_arg) == value
|
||||||
|
|
||||||
|
|
||||||
def test_node_field_only_type():
|
def test_node_field_only_type():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user