diff --git a/graphene/core/classtypes/tests/test_objecttype.py b/graphene/core/classtypes/tests/test_objecttype.py index ba20928d..609975f2 100644 --- a/graphene/core/classtypes/tests/test_objecttype.py +++ b/graphene/core/classtypes/tests/test_objecttype.py @@ -54,16 +54,18 @@ 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') assert h._private_state == 'custom' - + with raises(TypeError): Human(_other_private_state='My name') + def test_object_type_container_invalid_kwarg(): class Human(ObjectType): name = String()