mirror of
https://github.com/graphql-python/graphene.git
synced 2025-09-21 11:22: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
|
||||
|
||||
|
||||
def test_node_field_custom_name():
|
||||
name = "my_named_node"
|
||||
named_node_field = Node.Field(name=name)
|
||||
assert named_node_field.name == name
|
||||
def test_node_field_args():
|
||||
field_args = {
|
||||
"name": "my_custom_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():
|
||||
|
|
Loading…
Reference in New Issue
Block a user