mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-23 07:33:27 -06:00
35: Renamed unit_common.py to tstutil.py
This commit is contained in:
parent
31fc955355
commit
8a964d02b5
@ -21,7 +21,7 @@
|
||||
Unit tests for `ipalib.plugable` module.
|
||||
"""
|
||||
|
||||
import unit_common as uc
|
||||
import tstutil
|
||||
from ipalib import plugable, errors
|
||||
|
||||
|
||||
@ -57,17 +57,17 @@ def test_ReadOnly():
|
||||
obj = plugable.ReadOnly()
|
||||
names = ['not_an_attribute', 'an_attribute']
|
||||
for name in names:
|
||||
uc.no_set(obj, name)
|
||||
uc.no_del(obj, name)
|
||||
tstutil.no_set(obj, name)
|
||||
tstutil.no_del(obj, name)
|
||||
|
||||
class some_ro_class(plugable.ReadOnly):
|
||||
def __init__(self):
|
||||
object.__setattr__(self, 'an_attribute', 'Hello world!')
|
||||
obj = some_ro_class()
|
||||
for name in names:
|
||||
uc.no_set(obj, name)
|
||||
uc.no_del(obj, name)
|
||||
assert uc.read_only(obj, 'an_attribute') == 'Hello world!'
|
||||
tstutil.no_set(obj, name)
|
||||
tstutil.no_del(obj, name)
|
||||
assert tstutil.read_only(obj, 'an_attribute') == 'Hello world!'
|
||||
|
||||
|
||||
def test_Proxy():
|
||||
|
@ -18,7 +18,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
"""
|
||||
Utility functions for unit tests.
|
||||
Utility functions for the unit tests.
|
||||
"""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user