Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Goblin OGM
Goblin
Commits
b1dbe1d1
Commit
b1dbe1d1
authored
Aug 01, 2016
by
davebshow
Browse files
added tests for id setter/getter protection
parent
44145302
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_properties.py
View file @
b1dbe1d1
...
...
@@ -54,6 +54,16 @@ def test_setattr_validation(person):
setattr
(
person
,
'age'
,
'hello'
)
def
test_set_id_throws
(
person
):
with
pytest
.
raises
(
exception
.
ElementError
):
person
.
id
=
1
def
test_id_class_attr_throws
(
person_class
):
with
pytest
.
raises
(
exception
.
ElementError
):
person_class
.
id
# Vertex properties
def
test_set_change_vertex_property
(
person
):
assert
not
person
.
birthplace
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment