From 13b010685b60404e89ec0392ee3d4157fbb0788b Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Tue, 5 Apr 2016 13:10:05 +0200 Subject: frontend: remove the unused Command.soft_validate method https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: David Kupka --- ipatests/test_ipalib/test_frontend.py | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'ipatests') diff --git a/ipatests/test_ipalib/test_frontend.py b/ipatests/test_ipalib/test_frontend.py index a4af5e43c..58ab5f177 100644 --- a/ipatests/test_ipalib/test_frontend.py +++ b/ipatests/test_ipalib/test_frontend.py @@ -402,35 +402,6 @@ class test_Command(ClassChecker): for o in items: assert type(o) is output.Output - def test_soft_validate(self): - """ - Test the `ipalib.frontend.Command.soft_validate` method. - """ - class api(object): - env = config.Env(context='cli') - @staticmethod - def is_production_mode(): - return False - class user_add(frontend.Command): - takes_args = parameters.Str('uid', - normalizer=lambda value: value.lower(), - default_from=lambda givenname, sn: givenname[0] + sn, - ) - - takes_options = ('givenname', 'sn') - - cmd = user_add(api) - cmd.finalize() - assert list(cmd.params) == ['givenname', 'sn', 'uid', 'version'] - ret = cmd.soft_validate({}) - assert sorted(ret['values']) == ['version'] - assert sorted(ret['errors']) == ['givenname', 'sn', 'uid'] - assert cmd.soft_validate(dict(givenname=u'First', sn=u'Last')) == dict( - values=dict(givenname=u'First', sn=u'Last', uid=u'flast', - version=None), - errors=dict(), - ) - def test_convert(self): """ Test the `ipalib.frontend.Command.convert` method. -- cgit