mirror of
https://github.com/graphql-python/graphene.git
synced 2025-02-23 23:20:47 +03:00
Added test for private attributes
This commit is contained in:
parent
311e4793f9
commit
6512002623
|
@ -54,6 +54,13 @@ def test_object_type_set_properties():
|
|||
assert h.readonly_prop == 'readonly'
|
||||
assert h.write_prop == 'custom'
|
||||
|
||||
def test_object_type_set_private_attributes():
|
||||
class Human(ObjectType):
|
||||
_private_state = None
|
||||
|
||||
h = Human(_private_state='custom', _other_private_state='custom')
|
||||
assert h._private_state == 'custom'
|
||||
assert h._other_private_state == 'custom'
|
||||
|
||||
def test_object_type_container_invalid_kwarg():
|
||||
class Human(ObjectType):
|
||||
|
|
Loading…
Reference in New Issue
Block a user