summaryrefslogtreecommitdiffstats
path: root/ipalib/tests/test_base2.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-07-20 07:20:00 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-07-20 07:20:00 +0000
commitcf32ac337062d76babb8efbf217c4045138b686a (patch)
treec14e84911cef66fe330d4a3fa2e044168d0dd814 /ipalib/tests/test_base2.py
parent0cb26ef3ec68739a888f4295103210d301c2f9a8 (diff)
downloadfreeipa.git-cf32ac337062d76babb8efbf217c4045138b686a.tar.gz
freeipa.git-cf32ac337062d76babb8efbf217c4045138b686a.tar.xz
freeipa.git-cf32ac337062d76babb8efbf217c4045138b686a.zip
16: Changed base2.WithObj.__set_obj() slightly so that its gets locked into read-only even when _obj is None
Diffstat (limited to 'ipalib/tests/test_base2.py')
-rw-r--r--ipalib/tests/test_base2.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/ipalib/tests/test_base2.py b/ipalib/tests/test_base2.py
index cdf96bdb..398f6c63 100644
--- a/ipalib/tests/test_base2.py
+++ b/ipalib/tests/test_base2.py
@@ -140,3 +140,11 @@ def test_Registar():
assert cmd.obj is obj
assert r.commands.kinit.obj is None
+
+ for cmd in r.commands():
+ raised = False
+ try:
+ cmd.obj = None
+ except exceptions.TwiceSetError:
+ raised = True
+ assert raised