()
| 87 | |
| 88 | @pytest.mark.asyncio |
| 89 | async def test_async_client_get_key(): |
| 90 | client = AsyncDstackClient() |
| 91 | result = await client.get_key() # Test default algorithm (secp256k1) |
| 92 | assert isinstance(result, GetKeyResponse) |
| 93 | assert isinstance(result.decode_key(), bytes) |
| 94 | assert len(result.decode_key()) == 32 |
| 95 | |
| 96 | # Test specifying algorithm |
| 97 | result_ed = await client.get_key(algorithm="ed25519") |
| 98 | assert isinstance(result_ed, GetKeyResponse) |
| 99 | assert len(result_ed.decode_key()) == 32 |
| 100 | |
| 101 | with pytest.raises(Exception): # Assuming unsupported algo raises error |
| 102 | await client.get_key(algorithm="rsa") |
| 103 | |
| 104 | |
| 105 | @pytest.mark.asyncio |
nothing calls this directly
no test coverage detected