MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / test_to_keypair_with_tls_key

Function test_to_keypair_with_tls_key

sdk/python/tests/test_solana.py:51–63  ·  view source on GitHub ↗

Test to_keypair with TLS key response (should show warning).

()

Source from the content-addressed store, hash-verified

49
50
51def test_to_keypair_with_tls_key():
52 """Test to_keypair with TLS key response (should show warning)."""
53 client = DstackClient()
54 result = client.get_tls_key()
55
56 with warnings.catch_warnings(record=True) as w:
57 warnings.simplefilter("always")
58 keypair = to_keypair(result)
59
60 assert isinstance(keypair, Keypair)
61 assert len(w) == 1
62 assert issubclass(w[0].category, DeprecationWarning)
63 assert "Please don't use getTlsKey method" in str(w[0].message)
64
65
66def test_to_keypair_secure_with_tls_key():

Callers

nothing calls this directly

Calls 3

get_tls_keyMethod · 0.95
DstackClientClass · 0.90
to_keypairFunction · 0.90

Tested by

no test coverage detected