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

Function test_replay_rtmr

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

Source from the content-addressed store, hash-verified

146
147@pytest.mark.asyncio
148async def test_replay_rtmr():
149 client = AsyncDstackClient()
150 result = await client.get_quote("test")
151 # TODO evidence_api is a bit out-of-date, we need an up-to-date implementation.
152 tdxQuote = TdxQuote(bytearray(bytes.fromhex(result.quote)))
153 rtmrs = result.replay_rtmrs()
154 assert rtmrs[0] == tdxQuote.body.rtmr0.hex()
155 assert rtmrs[1] == tdxQuote.body.rtmr1.hex()
156 assert rtmrs[2] == tdxQuote.body.rtmr2.hex()
157 assert rtmrs[3] == tdxQuote.body.rtmr3.hex()
158
159
160@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 4

get_quoteMethod · 0.95
AsyncDstackClientClass · 0.90
TdxQuoteClass · 0.85
replay_rtmrsMethod · 0.45

Tested by

no test coverage detected