From 069763c5c616221fd0bcea813cad93ae3f7c072d Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Mon, 8 Feb 2010 05:03:28 -0700 Subject: Add Object.label class attribute, enable in webUI --- tests/test_ipalib/test_text.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'tests/test_ipalib/test_text.py') diff --git a/tests/test_ipalib/test_text.py b/tests/test_ipalib/test_text.py index 924534a0..dc5d02f8 100644 --- a/tests/test_ipalib/test_text.py +++ b/tests/test_ipalib/test_text.py @@ -39,6 +39,25 @@ class test_LazyText(object): assert inst.localedir == 'bar' +class test_FixMe(object): + klass = text.FixMe + + def test_init(self): + inst = self.klass('user.label') + assert inst.msg == 'user.label' + assert inst.domain is None + assert inst.localedir is None + + def test_repr(self): + inst = self.klass('user.label') + assert repr(inst) == "FixMe('user.label')" + + def test_unicode(self): + inst = self.klass('user.label') + assert unicode(inst) == u'' + assert type(unicode(inst)) is unicode + + class test_Gettext(object): klass = text.Gettext -- cgit