mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 06:00:32 +01:00
clients/tests: rename function Util.ReplaceTextUsingRegex to Util.ReplaceTextRegex
Seems to be the better name.
This commit is contained in:
parent
e35eceb9e3
commit
c041b02744
1 changed files with 3 additions and 3 deletions
|
|
@ -377,7 +377,7 @@ class Util:
|
|||
return replace_fcn
|
||||
|
||||
@staticmethod
|
||||
def ReplaceTextUsingRegex(pattern, replacement):
|
||||
def ReplaceTextRegex(pattern, replacement):
|
||||
# See ReplaceTextSimple.
|
||||
pattern = Util.as_bytes(pattern)
|
||||
replacement = Util.as_bytes(replacement)
|
||||
|
|
@ -1726,7 +1726,7 @@ class TestNmcli(NmTestBase):
|
|||
["g"],
|
||||
extra_env=no_dbus_env,
|
||||
replace_stderr=[
|
||||
Util.ReplaceTextUsingRegex(
|
||||
Util.ReplaceTextRegex(
|
||||
# depending on glib version, it prints `%s', '%s', or “%s”.
|
||||
# depending on libc version, it converts unicode to ? or *.
|
||||
r"Key/Value pair 0, [`*?']invalid[*?'], in address element [`*?']very:invalid[*?'] does not contain an equal sign",
|
||||
|
|
@ -1736,7 +1736,7 @@ class TestNmcli(NmTestBase):
|
|||
)
|
||||
|
||||
replace_uuids = [
|
||||
Util.ReplaceTextUsingRegex(
|
||||
Util.ReplaceTextRegex(
|
||||
r"\buuid=[-a-f0-9]+\b", "uuid=UUID-WAS-HERE-BUT-IS-NO-MORE-SADLY"
|
||||
)
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue