Files
gpu-rent/tests/test_sshtunnel_shim.py
Leonid Pershin a9cf2e0f90 Add support for gpu-rent.vars and enhance git update functionality
- Updated .gitignore to include gpu-rent.vars.
- Modified env.example to introduce the UPDATE_GIT variable for controlling git updates during execution.
- Implemented Import-GpuRentVars function in gpu-rent.ps1 to load environment variables from gpu-rent.vars.
- Enhanced gpu-rent.sh to support loading variables from gpu-rent.vars and added logic for handling default and extra arguments.
- Updated CLI documentation to reflect the new gpu-rent.vars file and its usage in configuration.
- Improved bootstrap and provisioning logic to conditionally perform git updates based on the new configuration.
2026-08-21 05:01:53 +03:00

19 lines
577 B
Python

import paramiko
from gpu_rent.tunnel import _patch_paramiko_for_sshtunnel, _ssh_tunnel_forwarder
def test_dsskey_shim_allows_sshtunnel_import():
# Simulate paramiko>=4 (no DSSKey) then ensure sshtunnel can load.
had = getattr(paramiko, "DSSKey", None)
if had is not None:
delattr(paramiko, "DSSKey")
try:
_patch_paramiko_for_sshtunnel()
assert hasattr(paramiko, "DSSKey")
cls = _ssh_tunnel_forwarder()
assert cls is not None
finally:
if had is not None:
paramiko.DSSKey = had