]> git.ipfire.org Git - people/ms/pakfire.git/commitdiff
tests: Fix syntax errors in keys tests
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 25 Jan 2024 16:00:13 +0000 (16:00 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 25 Jan 2024 16:00:13 +0000 (16:00 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tests/python/keys.py

index a444e8ea6416a668927903c5accc6fab6f29d5ce..14473ca90ab4e5185ebff2f0e0b6b4cfccfcca6a 100755 (executable)
@@ -56,7 +56,9 @@ class KeysTests(unittest.TestCase):
                )
 
                with open(path, "rb") as f:
-                       return self.pakfire.import_key(f)
+                       payload = f.read()
+
+               return self.pakfire.import_key(payload)
 
        def test_import_public_key(self):
                # Import a public key
@@ -77,7 +79,7 @@ class KeysTests(unittest.TestCase):
                        Generate a new key
                """
                key = self.pakfire.generate_key(
-                       algorithm=pakfire.PAKFIRE_KEY_ALGO_ED25519, key="Key 1")
+                       algorithm=pakfire.PAKFIRE_KEY_ALGO_ED25519, comment="Key 1")
 
                data = b"Pakfire"