Test that TLS key can be converted to bytes with as_uint8array method.
()
| 197 | |
| 198 | |
| 199 | def test_tls_key_as_uint8array(): |
| 200 | """Test that TLS key can be converted to bytes with as_uint8array method.""" |
| 201 | client = DstackClient() |
| 202 | result = client.get_tls_key() |
| 203 | |
| 204 | # Test full length |
| 205 | full_bytes = result.as_uint8array() |
| 206 | assert isinstance(full_bytes, bytes) |
| 207 | assert len(full_bytes) > 0 |
| 208 | |
| 209 | # Test with max_length |
| 210 | key_32 = result.as_uint8array(32) |
| 211 | assert isinstance(key_32, bytes) |
| 212 | assert len(key_32) == 32 |
| 213 | assert len(key_32) != len(full_bytes) |
| 214 | |
| 215 | |
| 216 | def test_tls_key_with_alt_names(): |
nothing calls this directly
no test coverage detected