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

Function test_sync_client_get_key

sdk/python/tests/test_client.py:28–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26
27
28def test_sync_client_get_key():
29 client = DstackClient()
30 result = client.get_key() # Test default algorithm (secp256k1)
31 assert isinstance(result, GetKeyResponse)
32 assert isinstance(result.decode_key(), bytes)
33 assert len(result.decode_key()) == 32
34
35 # Test specifying algorithm
36 result_ed = client.get_key(algorithm="ed25519")
37 assert isinstance(result_ed, GetKeyResponse)
38 assert len(result_ed.decode_key()) == 32
39
40 with pytest.raises(Exception): # Assuming unsupported algo raises error
41 client.get_key(algorithm="rsa")
42
43
44def test_sync_client_get_quote():

Callers

nothing calls this directly

Calls 3

get_keyMethod · 0.95
DstackClientClass · 0.90
decode_keyMethod · 0.45

Tested by

no test coverage detected