Commit 48717b24 authored by Łukasz Nowak's avatar Łukasz Nowak

Workaround more magic of setters.

parent cc107358
...@@ -25,7 +25,14 @@ class TestSlapOSConstraintMixin(testSlapOSMixin): ...@@ -25,7 +25,14 @@ class TestSlapOSConstraintMixin(testSlapOSMixin):
# required # required
try:
# try to drop property from object for ones, where doing
# edit(property=None) does not set None, but ('None',)...
delattr(obj, property_id) delattr(obj, property_id)
except AttributeError:
# ...but in case of magic ones (reference->default_reference)
# use setter to set it to None
obj.edit(**{property_id:None})
self.assertTrue(consistency_message in self.getMessageList(obj)) self.assertTrue(consistency_message in self.getMessageList(obj))
if empty_string: if empty_string:
......
241 242
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment