Fix attempted write to attribute of read-only object.

Add new class "cachedproperty" for creating property-like attributes
that cache the return value of a method call.

Also fix few issues in the unit tests to enable them to succeed.

ticket 1959
This commit is contained in:
Jan Cholasta
2012-01-02 11:51:26 +03:00
committed by Alexander Bokovoy
parent 46d3abc450
commit 9beb467d98
9 changed files with 55 additions and 17 deletions
+1 -1
View File
@@ -247,7 +247,7 @@ class test_Plugin(ClassChecker):
info = 'whatever'
e = raises(StandardError, check)
assert str(e) == \
"check.info attribute ('whatever') conflicts with Plugin logger"
"info is already bound to tests.test_ipalib.test_plugable.check()"
def test_set_api(self):
"""