diff options
author | Michael Abel <info@abel-ikt.de> | 2022-03-02 16:11:52 +0100 |
---|---|---|
committer | Michael Abel <info@abel-ikt.de> | 2022-03-02 16:11:52 +0100 |
commit | e2e13395d5e40d09b8fd2c4f04306c447089515c (patch) | |
tree | 40cad519b34cc0ceadbc1b8149b63b664a7626dd /tests | |
parent | 5a2ceb1b8b048d8d07d98182c280d226f04e3bb8 (diff) |
Use conventional string formatting ...
... json will confuse format() a lot, that is the easy way
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PySys/tedge/tedge_software_update/run.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/PySys/tedge/tedge_software_update/run.py b/tests/PySys/tedge/tedge_software_update/run.py index 5385cdd9..94ef9828 100644 --- a/tests/PySys/tedge/tedge_software_update/run.py +++ b/tests/PySys/tedge/tedge_software_update/run.py @@ -14,7 +14,7 @@ Then we find the string SUBCOMMANDS: in the output TEDGE_DOWNLOAD_DIR = "/tedge_download_dir" TEDGE_DOWNLOAD_PATH = "tmp.path" TOPIC = 'tedge/commands/req/software/update' -PAYLOAD = '{"id":"1234","updateList":[{"type":"apt","modules":[{"name":"rolldice","version":"::apt","url":"{}/inventory/binaries/11643549","action":"install"}]}]}' +PAYLOAD = '{"id":"1234","updateList":[{"type":"apt","modules":[{"name":"rolldice","version":"::apt","url":"%s/inventory/binaries/11643549","action":"install"}]}]}' class PySysTest(EnvironmentC8y): @@ -85,7 +85,7 @@ class PySysTest(EnvironmentC8y): # 4. trigger rolldice download _ = self.startProcess( command=self.sudo, - arguments=[self.tedge, "mqtt", "pub", TOPIC, PAYLOAD.format(self.project.c8yurl)], + arguments=[self.tedge, "mqtt", "pub", TOPIC, PAYLOAD%self.project.c8yurl ], stdouterr="rolldice_download", expectedExitStatus="==0", ) |