From cf32ac337062d76babb8efbf217c4045138b686a Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Sun, 20 Jul 2008 07:20:00 +0000 Subject: 16: Changed base2.WithObj.__set_obj() slightly so that its gets locked into read-only even when _obj is None --- ipalib/tests/test_base2.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ipalib/tests/test_base2.py') 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 -- cgit