Fix recognition of Pageant in the test fixtures
Marco Ricci

Marco Ricci commited on 2025-12-27 18:26:50
Zeige 1 geänderte Dateien mit 7 Einfügungen und 2 Löschungen.


When reacting to failures uploading a test key into an agent, both the
agent type `KnownSSHAgent.UNIXPageant` and the type
`KnownSSHAgent.Pageant` should be treated the same.  However, the
`ssh_agent_client_with_loaded_test_keys` only treated the former agent
type specially.  Now it also treats the latter type the same.
... ...
@@ -920,11 +920,16 @@ def _load_key_optimistically(
920 920
                 pair.key for pair in client.list_keys()
921 921
             })
922 922
             if (
923
-                agent_type == data.KnownSSHAgent.UNIXPageant
923
+                agent_type
924
+                in {data.KnownSSHAgent.UNIXPageant, data.KnownSSHAgent.Pageant}
924 925
                 and key_struct.public_key_data in current_loaded_keys
925 926
             ):
926 927
                 pass
927
-            elif agent_type == data.KnownSSHAgent.UNIXPageant and not isolated:
928
+            elif (
929
+                agent_type
930
+                in {data.KnownSSHAgent.UNIXPageant, data.KnownSSHAgent.Pageant}
931
+                and not isolated
932
+            ):
928 933
                 request_code, payload = _prepare_payload(
929 934
                     private_key_data, isolated=True
930 935
                 )
931 936