From f19218f7d87f5847d51f79b5d2850f90b0ae8407 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Wed, 18 Apr 2012 11:22:35 -0400 Subject: Remove duplicate and unused utility code IPA has some unused code from abandoned features (Radius, ipa 1.x user input, commant-line tab completion), as well as some duplicate utilities. This patch cleans up the utility modules. Duplicate code consolidated into ipapython.ipautil: {ipalib.util,ipaserver.ipautil,ipapython.ipautil}.realm_to_suffix {ipaserver,ipapython}.ipautil.CIDict (with style improvements from the ipaserver version) {ipapython.entity,ipaserver.ipautil}.utf8_encode_value {ipapython.entity,ipaserver.ipautil}.utf8_encode_values ipalib.util.get_fqdn was removed in favor of the same function in ipaserver.install.installutils Removed unused code: ipalib.util: load_plugins_in_dir import_plugins_subpackage make_repr (was imported but unused; also removed from tests) ipapython.ipautil: format_list parse_key_value_pairs read_pairs_file read_items_file user_input_plain AttributeValueCompleter ItemCompleter ipaserver.ipautil: get_gsserror (a different version exists in ipapython.ipautil) ipaserver.ipautil ended up empty and is removed entirely. https://fedorahosted.org/freeipa/ticket/2650 --- tests/test_ipalib/test_util.py | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'tests') diff --git a/tests/test_ipalib/test_util.py b/tests/test_ipalib/test_util.py index 8304d117..9d19dfb2 100644 --- a/tests/test_ipalib/test_util.py +++ b/tests/test_ipalib/test_util.py @@ -21,17 +21,6 @@ Test the `ipalib.util` module. """ -from tests.util import raises from ipalib import util -def test_make_repr(): - """ - Test the `ipalib.util.make_repr` function. - """ - f = util.make_repr - assert f('my') == 'my()' - assert f('my', True, u'hello') == "my(True, u'hello')" - assert f('my', one=1, two='two') == "my(one=1, two='two')" - assert f('my', None, 3, dog='animal', apple='fruit') == \ - "my(None, 3, apple='fruit', dog='animal')" -- cgit