mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-08-13 06:25:00 -05:00
Drop support for CSV in the CLI client
Ticket: https://fedorahosted.org/freeipa/ticket/3352 Design: http://freeipa.org/page/V3/Drop_CSV
This commit is contained in:
committed by
Martin Kosek
parent
b4915bd2fd
commit
3a96cbc518
@@ -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,
|
||||
|
||||
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user