cli/tests: cache UUID for test replacement in stdout

Instead of re-fetching the UUID each time with a D-Bus call,
cache/memoize it.

On my system, this improves

  $ make check-local-clients-tests-test-client

from 20.9 to 20.4 seconds (- 2.6%). That is not stellar, but noticible
enough to warrant this simple change.
This commit is contained in:
Thomas Haller
2018-07-24 10:14:12 +02:00
parent 4d435ee92a
commit 4b09c27d64
5 changed files with 1351 additions and 1342 deletions

View File

@@ -1,5 +1,5 @@
size: 395
location: clients/tests/test-client.py:818:test_001()/1
location: clients/tests/test-client.py:827:test_001()/1
cmd: $NMCLI
lang: C
returncode: 0
@@ -15,7 +15,7 @@ Consult nmcli(1) and nmcli-examples(5) manual pages for complete usage details.
<<<
size: 438
location: clients/tests/test-client.py:818:test_001()/2
location: clients/tests/test-client.py:827:test_001()/2
cmd: $NMCLI
lang: pl_PL.UTF-8
returncode: 0
@@ -33,7 +33,7 @@ o użyciu.
<<<
size: 188
location: clients/tests/test-client.py:820:test_001()/3
location: clients/tests/test-client.py:829:test_001()/3
cmd: $NMCLI -f AP -mode multiline -p d show wlan0
lang: C
returncode: 10
@@ -43,7 +43,7 @@ Error: Device 'wlan0' not found.
<<<
size: 214
location: clients/tests/test-client.py:820:test_001()/4
location: clients/tests/test-client.py:829:test_001()/4
cmd: $NMCLI -f AP -mode multiline -p d show wlan0
lang: pl_PL.UTF-8
returncode: 10
@@ -53,7 +53,7 @@ Błąd: Nie odnaleziono urządzenia „wlan0”.
<<<
size: 146
location: clients/tests/test-client.py:822:test_001()/5
location: clients/tests/test-client.py:831:test_001()/5
cmd: $NMCLI c s
lang: C
returncode: 0
@@ -63,7 +63,7 @@ NAME UUID TYPE DEVICE
<<<
size: 156
location: clients/tests/test-client.py:822:test_001()/6
location: clients/tests/test-client.py:831:test_001()/6
cmd: $NMCLI c s
lang: pl_PL.UTF-8
returncode: 0
@@ -73,7 +73,7 @@ NAME UUID TYPE DEVICE
<<<
size: 192
location: clients/tests/test-client.py:824:test_001()/7
location: clients/tests/test-client.py:833:test_001()/7
cmd: $NMCLI bogus s
lang: C
returncode: 2
@@ -83,7 +83,7 @@ Error: argument 'bogus' not understood. Try passing --help instead.
<<<
size: 221
location: clients/tests/test-client.py:824:test_001()/8
location: clients/tests/test-client.py:833:test_001()/8
cmd: $NMCLI bogus s
lang: pl_PL.UTF-8
returncode: 2
@@ -93,7 +93,7 @@ Błąd: nie zrozumiano parametru „bogus”. Można użyć „--help” zamiast
<<<
size: 1413
location: clients/tests/test-client.py:827:test_001()/9
location: clients/tests/test-client.py:836:test_001()/9
cmd: $NMCLI general permissions
lang: C
returncode: 0
@@ -119,7 +119,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check unknown
<<<
size: 1441
location: clients/tests/test-client.py:827:test_001()/10
location: clients/tests/test-client.py:836:test_001()/10
cmd: $NMCLI general permissions
lang: pl_PL.UTF-8
returncode: 0
@@ -145,7 +145,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check nieznane
<<<
size: 1543
location: clients/tests/test-client.py:827:test_001()/11
location: clients/tests/test-client.py:836:test_001()/11
cmd: $NMCLI --color yes general permissions
lang: C
returncode: 0
@@ -171,7 +171,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check unknown
<<<
size: 1570
location: clients/tests/test-client.py:827:test_001()/12
location: clients/tests/test-client.py:836:test_001()/12
cmd: $NMCLI --color yes general permissions
lang: pl_PL.UTF-8
returncode: 0
@@ -197,7 +197,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check nieznane
<<<
size: 1620
location: clients/tests/test-client.py:827:test_001()/13
location: clients/tests/test-client.py:836:test_001()/13
cmd: $NMCLI --pretty general permissions
lang: C
returncode: 0
@@ -227,7 +227,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check unknown
<<<
size: 1677
location: clients/tests/test-client.py:827:test_001()/14
location: clients/tests/test-client.py:836:test_001()/14
cmd: $NMCLI --pretty general permissions
lang: pl_PL.UTF-8
returncode: 0
@@ -257,7 +257,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check nieznane
<<<
size: 1749
location: clients/tests/test-client.py:827:test_001()/15
location: clients/tests/test-client.py:836:test_001()/15
cmd: $NMCLI --pretty --color yes general permissions
lang: C
returncode: 0
@@ -287,7 +287,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check unknown
<<<
size: 1806
location: clients/tests/test-client.py:827:test_001()/16
location: clients/tests/test-client.py:836:test_001()/16
cmd: $NMCLI --pretty --color yes general permissions
lang: pl_PL.UTF-8
returncode: 0
@@ -317,7 +317,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check nieznane
<<<
size: 1045
location: clients/tests/test-client.py:827:test_001()/17
location: clients/tests/test-client.py:836:test_001()/17
cmd: $NMCLI --terse general permissions
lang: C
returncode: 0
@@ -342,7 +342,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check:unknown
<<<
size: 1055
location: clients/tests/test-client.py:827:test_001()/18
location: clients/tests/test-client.py:836:test_001()/18
cmd: $NMCLI --terse general permissions
lang: pl_PL.UTF-8
returncode: 0
@@ -367,7 +367,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check:unknown
<<<
size: 1175
location: clients/tests/test-client.py:827:test_001()/19
location: clients/tests/test-client.py:836:test_001()/19
cmd: $NMCLI --terse --color yes general permissions
lang: C
returncode: 0
@@ -392,7 +392,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check:unknown
<<<
size: 1185
location: clients/tests/test-client.py:827:test_001()/20
location: clients/tests/test-client.py:836:test_001()/20
cmd: $NMCLI --terse --color yes general permissions
lang: pl_PL.UTF-8
returncode: 0
@@ -417,7 +417,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check:unknown
<<<
size: 1429
location: clients/tests/test-client.py:827:test_001()/21
location: clients/tests/test-client.py:836:test_001()/21
cmd: $NMCLI --mode tabular general permissions
lang: C
returncode: 0
@@ -443,7 +443,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check unknown
<<<
size: 1456
location: clients/tests/test-client.py:827:test_001()/22
location: clients/tests/test-client.py:836:test_001()/22
cmd: $NMCLI --mode tabular general permissions
lang: pl_PL.UTF-8
returncode: 0
@@ -469,7 +469,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check nieznane
<<<
size: 1558
location: clients/tests/test-client.py:827:test_001()/23
location: clients/tests/test-client.py:836:test_001()/23
cmd: $NMCLI --mode tabular --color yes general permissions
lang: C
returncode: 0
@@ -495,7 +495,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check unknown
<<<
size: 1585
location: clients/tests/test-client.py:827:test_001()/24
location: clients/tests/test-client.py:836:test_001()/24
cmd: $NMCLI --mode tabular --color yes general permissions
lang: pl_PL.UTF-8
returncode: 0
@@ -521,7 +521,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check nieznane
<<<
size: 1635
location: clients/tests/test-client.py:827:test_001()/25
location: clients/tests/test-client.py:836:test_001()/25
cmd: $NMCLI --mode tabular --pretty general permissions
lang: C
returncode: 0
@@ -551,7 +551,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check unknown
<<<
size: 1692
location: clients/tests/test-client.py:827:test_001()/26
location: clients/tests/test-client.py:836:test_001()/26
cmd: $NMCLI --mode tabular --pretty general permissions
lang: pl_PL.UTF-8
returncode: 0
@@ -581,7 +581,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check nieznane
<<<
size: 1764
location: clients/tests/test-client.py:827:test_001()/27
location: clients/tests/test-client.py:836:test_001()/27
cmd: $NMCLI --mode tabular --pretty --color yes general permissions
lang: C
returncode: 0
@@ -611,7 +611,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check unknown
<<<
size: 1821
location: clients/tests/test-client.py:827:test_001()/28
location: clients/tests/test-client.py:836:test_001()/28
cmd: $NMCLI --mode tabular --pretty --color yes general permissions
lang: pl_PL.UTF-8
returncode: 0
@@ -641,7 +641,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check nieznane
<<<
size: 1060
location: clients/tests/test-client.py:827:test_001()/29
location: clients/tests/test-client.py:836:test_001()/29
cmd: $NMCLI --mode tabular --terse general permissions
lang: C
returncode: 0
@@ -666,7 +666,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check:unknown
<<<
size: 1070
location: clients/tests/test-client.py:827:test_001()/30
location: clients/tests/test-client.py:836:test_001()/30
cmd: $NMCLI --mode tabular --terse general permissions
lang: pl_PL.UTF-8
returncode: 0
@@ -691,7 +691,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check:unknown
<<<
size: 1190
location: clients/tests/test-client.py:827:test_001()/31
location: clients/tests/test-client.py:836:test_001()/31
cmd: $NMCLI --mode tabular --terse --color yes general permissions
lang: C
returncode: 0
@@ -716,7 +716,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check:unknown
<<<
size: 1200
location: clients/tests/test-client.py:827:test_001()/32
location: clients/tests/test-client.py:836:test_001()/32
cmd: $NMCLI --mode tabular --terse --color yes general permissions
lang: pl_PL.UTF-8
returncode: 0
@@ -741,7 +741,7 @@ org.freedesktop.NetworkManager.enable-disable-connectivity-check:unknown
<<<
size: 2335
location: clients/tests/test-client.py:827:test_001()/33
location: clients/tests/test-client.py:836:test_001()/33
cmd: $NMCLI --mode multiline general permissions
lang: C
returncode: 0
@@ -782,7 +782,7 @@ VALUE: unknown
<<<
size: 2351
location: clients/tests/test-client.py:827:test_001()/34
location: clients/tests/test-client.py:836:test_001()/34
cmd: $NMCLI --mode multiline general permissions
lang: pl_PL.UTF-8
returncode: 0
@@ -823,7 +823,7 @@ VALUE: nieznane
<<<
size: 2464
location: clients/tests/test-client.py:827:test_001()/35
location: clients/tests/test-client.py:836:test_001()/35
cmd: $NMCLI --mode multiline --color yes general permissions
lang: C
returncode: 0
@@ -864,7 +864,7 @@ VALUE: unknown
<<<
size: 2480
location: clients/tests/test-client.py:827:test_001()/36
location: clients/tests/test-client.py:836:test_001()/36
cmd: $NMCLI --mode multiline --color yes general permissions
lang: pl_PL.UTF-8
returncode: 0
@@ -905,7 +905,7 @@ VALUE: nieznane
<<<
size: 3837
location: clients/tests/test-client.py:827:test_001()/37
location: clients/tests/test-client.py:836:test_001()/37
cmd: $NMCLI --mode multiline --pretty general permissions
lang: C
returncode: 0
@@ -965,7 +965,7 @@ VALUE: unknown
<<<
size: 3858
location: clients/tests/test-client.py:827:test_001()/38
location: clients/tests/test-client.py:836:test_001()/38
cmd: $NMCLI --mode multiline --pretty general permissions
lang: pl_PL.UTF-8
returncode: 0
@@ -1025,7 +1025,7 @@ VALUE: nieznane
<<<
size: 3966
location: clients/tests/test-client.py:827:test_001()/39
location: clients/tests/test-client.py:836:test_001()/39
cmd: $NMCLI --mode multiline --pretty --color yes general permissions
lang: C
returncode: 0
@@ -1085,7 +1085,7 @@ VALUE: unknown
<<<
size: 3987
location: clients/tests/test-client.py:827:test_001()/40
location: clients/tests/test-client.py:836:test_001()/40
cmd: $NMCLI --mode multiline --pretty --color yes general permissions
lang: pl_PL.UTF-8
returncode: 0
@@ -1145,7 +1145,7 @@ VALUE: nieznane
<<<
size: 1335
location: clients/tests/test-client.py:827:test_001()/41
location: clients/tests/test-client.py:836:test_001()/41
cmd: $NMCLI --mode multiline --terse general permissions
lang: C
returncode: 0
@@ -1186,7 +1186,7 @@ VALUE:unknown
<<<
size: 1345
location: clients/tests/test-client.py:827:test_001()/42
location: clients/tests/test-client.py:836:test_001()/42
cmd: $NMCLI --mode multiline --terse general permissions
lang: pl_PL.UTF-8
returncode: 0
@@ -1227,7 +1227,7 @@ VALUE:unknown
<<<
size: 1464
location: clients/tests/test-client.py:827:test_001()/43
location: clients/tests/test-client.py:836:test_001()/43
cmd: $NMCLI --mode multiline --terse --color yes general permissions
lang: C
returncode: 0
@@ -1268,7 +1268,7 @@ VALUE:unknown
<<<
size: 1474
location: clients/tests/test-client.py:827:test_001()/44
location: clients/tests/test-client.py:836:test_001()/44
cmd: $NMCLI --mode multiline --terse --color yes general permissions
lang: pl_PL.UTF-8
returncode: 0

View File

@@ -1,5 +1,5 @@
size: 377
location: clients/tests/test-client.py:833:test_002()/1
location: clients/tests/test-client.py:842:test_002()/1
cmd: $NMCLI d
lang: C
returncode: 0
@@ -14,7 +14,7 @@ wlan1 wifi unavailable --
<<<
size: 392
location: clients/tests/test-client.py:833:test_002()/2
location: clients/tests/test-client.py:842:test_002()/2
cmd: $NMCLI d
lang: pl_PL.UTF-8
returncode: 0
@@ -29,7 +29,7 @@ wlan1 wifi niedostępne --
<<<
size: 762
location: clients/tests/test-client.py:835:test_002()/3
location: clients/tests/test-client.py:844:test_002()/3
cmd: $NMCLI -f all d
lang: C
returncode: 0
@@ -44,7 +44,7 @@ wlan1 wifi unavailable /org/freedesktop/NetworkManager/Devices/5 --
<<<
size: 777
location: clients/tests/test-client.py:835:test_002()/4
location: clients/tests/test-client.py:844:test_002()/4
cmd: $NMCLI -f all d
lang: pl_PL.UTF-8
returncode: 0
@@ -59,7 +59,7 @@ wlan1 wifi niedostępne /org/freedesktop/NetworkManager/Devices/5 --
<<<
size: 739
location: clients/tests/test-client.py:837:test_002()/5
location: clients/tests/test-client.py:846:test_002()/5
cmd: $NMCLI
lang: C
returncode: 0
@@ -95,7 +95,7 @@ Consult nmcli(1) and nmcli-examples(5) manual pages for complete usage details.
<<<
size: 812
location: clients/tests/test-client.py:837:test_002()/6
location: clients/tests/test-client.py:846:test_002()/6
cmd: $NMCLI
lang: pl_PL.UTF-8
returncode: 0
@@ -133,7 +133,7 @@ o użyciu.
<<<
size: 1260
location: clients/tests/test-client.py:839:test_002()/7
location: clients/tests/test-client.py:848:test_002()/7
cmd: $NMCLI -f AP -mode multiline d show wlan0
lang: C
returncode: 0
@@ -166,7 +166,7 @@ AP[3].SECURITY: WPA1 WPA2
<<<
size: 1297
location: clients/tests/test-client.py:839:test_002()/8
location: clients/tests/test-client.py:848:test_002()/8
cmd: $NMCLI -f AP -mode multiline d show wlan0
lang: pl_PL.UTF-8
returncode: 0
@@ -199,7 +199,7 @@ AP[3].SECURITY: WPA1 WPA2
<<<
size: 1714
location: clients/tests/test-client.py:840:test_002()/9
location: clients/tests/test-client.py:849:test_002()/9
cmd: $NMCLI -f AP -mode multiline -p d show wlan0
lang: C
returncode: 0
@@ -238,7 +238,7 @@ AP[3].SECURITY: WPA1 WPA2
<<<
size: 1759
location: clients/tests/test-client.py:840:test_002()/10
location: clients/tests/test-client.py:849:test_002()/10
cmd: $NMCLI -f AP -mode multiline -p d show wlan0
lang: pl_PL.UTF-8
returncode: 0
@@ -277,7 +277,7 @@ AP[3].SECURITY: WPA1 WPA2
<<<
size: 591
location: clients/tests/test-client.py:841:test_002()/11
location: clients/tests/test-client.py:850:test_002()/11
cmd: $NMCLI -f AP -mode multiline -t d show wlan0
lang: C
returncode: 0
@@ -310,7 +310,7 @@ AP[3].SECURITY:WPA1 WPA2
<<<
size: 628
location: clients/tests/test-client.py:841:test_002()/12
location: clients/tests/test-client.py:850:test_002()/12
cmd: $NMCLI -f AP -mode multiline -t d show wlan0
lang: pl_PL.UTF-8
returncode: 0
@@ -343,7 +343,7 @@ AP[3].SECURITY:WPA1 WPA2
<<<
size: 455
location: clients/tests/test-client.py:842:test_002()/13
location: clients/tests/test-client.py:851:test_002()/13
cmd: $NMCLI -f AP -mode tabular d show wlan0
lang: C
returncode: 0
@@ -356,7 +356,7 @@ AP[3] wlan0-ap-2 Infra 1 54 Mbit/s 34 ** WPA1 WPA2
<<<
size: 499
location: clients/tests/test-client.py:842:test_002()/14
location: clients/tests/test-client.py:851:test_002()/14
cmd: $NMCLI -f AP -mode tabular d show wlan0
lang: pl_PL.UTF-8
returncode: 0
@@ -369,7 +369,7 @@ AP[3] wlan0-ap-2 Infrastruktura 1 54Mb/s 34 ** WPA1 W
<<<
size: 614
location: clients/tests/test-client.py:843:test_002()/15
location: clients/tests/test-client.py:852:test_002()/15
cmd: $NMCLI -f AP -mode tabular -p d show wlan0
lang: C
returncode: 0
@@ -386,7 +386,7 @@ AP[3] wlan0-ap-2 Infra 1 54 Mbit/s 34 ** WPA1 WPA2
<<<
size: 694
location: clients/tests/test-client.py:843:test_002()/16
location: clients/tests/test-client.py:852:test_002()/16
cmd: $NMCLI -f AP -mode tabular -p d show wlan0
lang: pl_PL.UTF-8
returncode: 0
@@ -403,7 +403,7 @@ AP[3] wlan0-ap-2 Infrastruktura 1 54Mb/s 34 ** WPA1 W
<<<
size: 319
location: clients/tests/test-client.py:844:test_002()/17
location: clients/tests/test-client.py:853:test_002()/17
cmd: $NMCLI -f AP -mode tabular -t d show wlan0
lang: C
returncode: 0
@@ -415,7 +415,7 @@ AP[3]: :wlan0-ap-2:Infra:1:54 Mbit/s:34:** :WPA1 WPA2
<<<
size: 356
location: clients/tests/test-client.py:844:test_002()/18
location: clients/tests/test-client.py:853:test_002()/18
cmd: $NMCLI -f AP -mode tabular -t d show wlan0
lang: pl_PL.UTF-8
returncode: 0
@@ -427,7 +427,7 @@ AP[3]: :wlan0-ap-2:Infrastruktura:1:54Mb/s:34:** :WPA1 WPA2
<<<
size: 1973
location: clients/tests/test-client.py:846:test_002()/19
location: clients/tests/test-client.py:855:test_002()/19
cmd: $NMCLI -f ALL d wifi
lang: C
returncode: 0
@@ -445,7 +445,7 @@ NAME SSID SSID-HEX BSSID MODE CHAN FREQ RATE SIGNAL BARS SECURITY WPA
<<<
size: 2041
location: clients/tests/test-client.py:846:test_002()/20
location: clients/tests/test-client.py:855:test_002()/20
cmd: $NMCLI -f ALL d wifi
lang: pl_PL.UTF-8
returncode: 0
@@ -463,7 +463,7 @@ NAME SSID SSID-HEX BSSID MODE CHAN FREQ RATE SIGNAL BARS SECURITY WPA
<<<
size: 246
location: clients/tests/test-client.py:848:test_002()/21
location: clients/tests/test-client.py:857:test_002()/21
cmd: $NMCLI c
lang: C
returncode: 0
@@ -474,7 +474,7 @@ con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet --
<<<
size: 256
location: clients/tests/test-client.py:848:test_002()/22
location: clients/tests/test-client.py:857:test_002()/22
cmd: $NMCLI c
lang: pl_PL.UTF-8
returncode: 0
@@ -485,7 +485,7 @@ con-1 5fcfd6d7-1e63-3332-8826-a7eda103792d ethernet --
<<<
size: 1118
location: clients/tests/test-client.py:850:test_002()/23
location: clients/tests/test-client.py:859:test_002()/23
cmd: $NMCLI c s con-1
lang: C
returncode: 0
@@ -515,7 +515,7 @@ connection.mdns: -1 (default)
<<<
size: 1130
location: clients/tests/test-client.py:850:test_002()/24
location: clients/tests/test-client.py:859:test_002()/24
cmd: $NMCLI c s con-1
lang: pl_PL.UTF-8
returncode: 0

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -141,6 +141,15 @@ class Util:
t = basestring
return isinstance(s, t)
@staticmethod
def memoize_nullary(nullary_func):
result = []
def closure():
if not result:
result.append(nullary_func())
return result[0]
return closure
_find_unsafe = re.compile(r'[^\w@%+=:,./-]',
re.ASCII if sys.version_info[0] >= 3 else 0).search
@@ -855,7 +864,7 @@ class TestNmcli(NmTestBase):
replace_stdout = []
replace_stdout.append((lambda: self.srv.findConnectionUuid('con-xx1'), 'UUID-con-xx1-REPLACED-REPLACED-REPLA'))
replace_stdout.append((Util.memoize_nullary(lambda: self.srv.findConnectionUuid('con-xx1')), 'UUID-con-xx1-REPLACED-REPLACED-REPLA'))
self.call_nmcli(['c', 'add', 'type', 'ethernet', 'ifname', '*', 'con-name', 'con-xx1'],
replace_stdout = replace_stdout)
@@ -863,7 +872,7 @@ class TestNmcli(NmTestBase):
self.call_nmcli_l(['c', 's'],
replace_stdout = replace_stdout)
replace_stdout.append((lambda: self.srv.findConnectionUuid('ethernet'), 'UUID-ethernet-REPLACED-REPLACED-REPL'))
replace_stdout.append((Util.memoize_nullary(lambda: self.srv.findConnectionUuid('ethernet')), 'UUID-ethernet-REPLACED-REPLACED-REPL'))
self.call_nmcli(['c', 'add', 'type', 'ethernet', 'ifname', '*'],
replace_stdout = replace_stdout)
@@ -957,7 +966,7 @@ class TestNmcli(NmTestBase):
replace_stdout = []
replace_stdout.append((lambda: self.srv.findConnectionUuid('con-xx1'), 'UUID-con-xx1-REPLACED-REPLACED-REPLA'))
replace_stdout.append((Util.memoize_nullary(lambda: self.srv.findConnectionUuid('con-xx1')), 'UUID-con-xx1-REPLACED-REPLACED-REPLA'))
self.call_nmcli(['c', 'add', 'type', 'wifi', 'ifname', '*', 'ssid', 'foobar', 'con-name', 'con-xx1'],
replace_stdout = replace_stdout)
@@ -973,7 +982,7 @@ class TestNmcli(NmTestBase):
self.async_wait()
replace_stdout.append((lambda: self.srv.findConnectionUuid('con-vpn-1'), 'UUID-con-vpn-1-REPLACED-REPLACED-REP'))
replace_stdout.append((Util.memoize_nullary(lambda: self.srv.findConnectionUuid('con-vpn-1')), 'UUID-con-vpn-1-REPLACED-REPLACED-REP'))
self.call_nmcli(['connection', 'add', 'type', 'vpn', 'con-name', 'con-vpn-1', 'ifname', '*', 'vpn-type', 'openvpn', 'vpn.data', 'key1 = val1, key2 = val2, key3=val3'],
replace_stdout = replace_stdout)