aboutsummaryrefslogtreecommitdiffstats
path: root/tests/report_tests/encryption_tests.py
diff options
context:
space:
mode:
authorArif Ali <arif.ali@canonical.com>2024-04-18 12:54:50 +0100
committerJake Hunsaker <jacob.r.hunsaker@gmail.com>2024-05-02 10:47:52 -0400
commit799425b80267fe215f9b9191348c8032deec013c (patch)
treed77e3f715d9c6eaaf67396c5d0534918971a26b1 /tests/report_tests/encryption_tests.py
parent5a2091c1b0d85c15d01c22e40752950a1a6cd464 (diff)
downloadsos-799425b80267fe215f9b9191348c8032deec013c.tar.gz
[pylint] Convert all tests to f-strings
Signed-off-by: Arif Ali <arif.ali@canonical.com>
Diffstat (limited to 'tests/report_tests/encryption_tests.py')
-rw-r--r--tests/report_tests/encryption_tests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/report_tests/encryption_tests.py b/tests/report_tests/encryption_tests.py
index 64b01fde..c18398a8 100644
--- a/tests/report_tests/encryption_tests.py
+++ b/tests/report_tests/encryption_tests.py
@@ -19,11 +19,11 @@ class EncryptedReportTest(StageOneReportTest):
"""
encrypt_pass = 'sostest'
- sos_cmd = "-o kernel --encrypt-pass %s" % encrypt_pass
+ sos_cmd = f"-o kernel --encrypt-pass {encrypt_pass}"
def test_archive_gpg_encrypted(self):
self.assertOutputContains(r'/.*sosreport-.*tar.*\.gpg')
- _cmd = "file %s" % self.encrypted_path
+ _cmd = f"file {self.encrypted_path}"
res = process.run(_cmd)
self.assertTrue(
("GPG symmetrically encrypted data" in res.stdout.decode())
@@ -41,7 +41,7 @@ class EncryptedCleanedReportTest(EncryptedReportTest):
"""
encrypt_pass = 'sostest'
- sos_cmd = "-o host,networking --clean --encrypt-pass %s" % encrypt_pass
+ sos_cmd = f"-o host,networking --clean --encrypt-pass {encrypt_pass}"
def test_hostname_obfuscated(self):
self.assertFileHasContent('hostname', 'host0')