diff options
Diffstat (limited to 'clients/tests/test-client.py')
-rwxr-xr-x | clients/tests/test-client.py | 44 |
1 files changed, 15 insertions, 29 deletions
diff --git a/clients/tests/test-client.py b/clients/tests/test-client.py index 74225ccfab..b8010bc247 100755 --- a/clients/tests/test-client.py +++ b/clients/tests/test-client.py @@ -235,7 +235,9 @@ class Util: for fmt in [[], ['--pretty'], ['--terse']]: - yield mode + fmt + for color in [[], + ['--color', 'yes']]: + yield mode + fmt + color ############################################################################### @@ -552,6 +554,7 @@ class TestNmcli(NmTestBase): env['LIBNM_USE_SESSION_BUS'] = '1' env['LIBNM_USE_NO_UDEV'] = '1' env['TERM'] = 'linux' + env['XDG_CONFIG_HOME'] = PathConfiguration.srcdir() if fatal_warnings is _DEFAULT_ARG or fatal_warnings: env['G_DEBUG'] = 'fatal-warnings' @@ -867,38 +870,21 @@ class TestNmcli(NmTestBase): self.async_wait() self.srv.op_ConnectionSetVisible(False, con_id = 'ethernet') - self.call_nmcli_l(['-f', 'ALL', 'con'], - replace_stdout = replace_stdout) - - self.call_nmcli_l(['-f', 'UUID,TYPE', 'con'], - replace_stdout = replace_stdout) - - self.call_nmcli_l(['-f', 'UUID,TYPE', '--mode', 'multiline', 'con'], - replace_stdout = replace_stdout) + for mode in Util.iter_nmcli_output_modes(): + self.call_nmcli_l(mode + ['-f', 'ALL', 'con'], + replace_stdout = replace_stdout) - self.call_nmcli_l(['-f', 'UUID,TYPE', '--mode', 'multiline', '--terse', 'con'], - replace_stdout = replace_stdout) + self.call_nmcli_l(mode + ['-f', 'UUID,TYPE', 'con'], + replace_stdout = replace_stdout) - self.call_nmcli_l(['-f', 'UUID,TYPE', '--mode', 'multiline', '--pretty', 'con'], - replace_stdout = replace_stdout) + self.call_nmcli_l(mode + ['con', 's', 'ethernet'], + replace_stdout = replace_stdout) - self.call_nmcli_l(['-f', 'UUID,TYPE', '--mode', 'tabular', 'con'], - replace_stdout = replace_stdout) + self.call_nmcli_l(mode + ['c', 's', '/org/freedesktop/NetworkManager/ActiveConnection/1'], + replace_stdout = replace_stdout) - self.call_nmcli_l(['-f', 'UUID,TYPE', '--mode', 'tabular', '--terse', 'con'], - replace_stdout = replace_stdout) - - self.call_nmcli_l(['-f', 'UUID,TYPE', '--mode', 'tabular', '--pretty', 'con'], - replace_stdout = replace_stdout) - - self.call_nmcli_l(['con', 's', 'ethernet'], - replace_stdout = replace_stdout) - - self.call_nmcli_l(['c', 's', '/org/freedesktop/NetworkManager/ActiveConnection/1'], - replace_stdout = replace_stdout) - - self.call_nmcli_l(['-f', 'all', 'dev', 'show', 'eth0'], - replace_stdout = replace_stdout) + self.call_nmcli_l(mode + ['-f', 'all', 'dev', 'show', 'eth0'], + replace_stdout = replace_stdout) def test_004(self): self.init_001() |