From 3a96cbc5184688830edf79e4831f729a1bf7aa44 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Thu, 14 Feb 2013 11:49:47 -0500 Subject: Drop support for CSV in the CLI client Ticket: https://fedorahosted.org/freeipa/ticket/3352 Design: http://freeipa.org/page/V3/Drop_CSV --- tests/test_cmdline/test_cli.py | 8 ++++---- tests/test_ipalib/test_parameters.py | 17 ----------------- 2 files changed, 4 insertions(+), 21 deletions(-) (limited to 'tests') diff --git a/tests/test_cmdline/test_cli.py b/tests/test_cmdline/test_cli.py index 4d730d582..388c54e24 100644 --- a/tests/test_cmdline/test_cli.py +++ b/tests/test_cmdline/test_cli.py @@ -72,13 +72,13 @@ class TestCLIParsing(object): version=API_VERSION) def test_sudocmdgroup_add_member(self): - # Test CSV splitting is done correctly + # Test CSV splitting is not done self.check_command( # The following is as it would appear on the command line: - r'sudocmdgroup-add-member tcmdgroup1 --sudocmds=abc,\"de,f\",\\,g', + r'sudocmdgroup-add-member tcmdgroup1 --sudocmds=ab,c --sudocmds=d', 'sudocmdgroup_add_member', cn=u'tcmdgroup1', - sudocmd=[u'abc', u'de,f', u'\\', u'g'], + sudocmd=[u'ab,c', u'd'], raw=False, all=False, version=API_VERSION) @@ -122,7 +122,7 @@ class TestCLIParsing(object): 'dnsrecord_add', dnszoneidnsname=u'test-example.com', idnsname=u'ns', - arecord=[u'1.2.3.4'], + arecord=u'1.2.3.4', structured=False, force=False, raw=False, diff --git a/tests/test_ipalib/test_parameters.py b/tests/test_ipalib/test_parameters.py index 47c5de1fc..192db3da7 100644 --- a/tests/test_ipalib/test_parameters.py +++ b/tests/test_ipalib/test_parameters.py @@ -616,23 +616,6 @@ class test_Param(ClassChecker): assert o._convert_scalar.value is default assert o.normalizer.value is default - def test_split_csv(self): - """ - Test the `ipalib.parameters.Param.split_csv` method with csv. - """ - o = self.cls('my_list+', csv=True) - n = o.split_csv('a,b') - assert type(n) is tuple - assert len(n) is 2 - - n = o.split_csv('bar, "hi, there",foo') - assert type(n) is tuple - assert len(n) is 3 - - e = raises(ValidationError, o.split_csv, '"a') - assert e.name == 'my_list' - assert e.error == u'Improperly formatted CSV value (newline inside string)' - class test_Flag(ClassChecker): """ -- cgit