From 915486dadc476df4915cefdfeb8d61c43664ca60 Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Thu, 4 Sep 2008 08:16:12 +0000 Subject: 260: Option.normalize() now does same conversion for multivalue as Option.convert() does --- ipalib/tests/test_public.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'ipalib/tests/test_public.py') diff --git a/ipalib/tests/test_public.py b/ipalib/tests/test_public.py index 6adc393f..6cdfc5af 100644 --- a/ipalib/tests/test_public.py +++ b/ipalib/tests/test_public.py @@ -215,12 +215,10 @@ class test_Option(ClassChecker): # Scenario 4: multivalue=True, normalize=callback o = self.cls(name, doc, t, multivalue=True, normalize=callback) - for value in [(u'Hello',), (u'hello',)]: # Okay + for value in [(u'Hello',), (u'hello',), 'Hello', ['Hello']]: # Okay assert o.normalize(value) == (u'hello',) - for v in (None, u'Hello', [u'hello']): # Not tuple - check_TypeError(v, tuple, 'value', o.normalize, v) fail = 42 # Not basestring - for v in [(fail,), (u'Hello', fail)]: # Non unicode member + for v in [fail, [fail], (u'Hello', fail)]: # Non unicode member check_TypeError(fail, basestring, 'value', o.normalize, v) def test_validate(self): -- cgit