Skip to content

Commit 2cf22c2

Browse files
author
balogh.adam@icloud.com
committed
test
1 parent 9282113 commit 2cf22c2

1 file changed

Lines changed: 2 additions & 17 deletions

File tree

tests/tee_connection_test.py

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ def _mock_registry_with_tee(endpoint="https://tee.endpoint", tls_cert_der=None,
5353
return mock_reg
5454

5555

56-
# ── Tests ────────────────────────────────────────────────────────────
57-
58-
5956
class TestActiveTEE:
6057
def test_metadata_returns_dict(self):
6158
tee = ActiveTEE(
@@ -126,25 +123,13 @@ async def test_resolve_exception_wraps_in_runtime_error(self):
126123
with pytest.raises(RuntimeError, match="Failed to fetch LLM TEE"):
127124
RegistryTEEConnection(x402_client=_mock_x402_client(), registry=mock_reg)
128125

129-
async def test_resolve_success_with_cert(self):
126+
async def test_resolve_success(self):
130127
mock_reg = _mock_registry_with_tee(
131128
endpoint="https://registry.tee",
132-
tls_cert_der=b"cert-bytes",
133129
tee_id="tee-42",
134130
payment_address="0xPay",
135131
)
136-
137-
with (
138-
patch(
139-
"src.opengradient.client.tee_connection.x402HttpxClient",
140-
side_effect=FakeHTTPClient,
141-
),
142-
patch(
143-
"src.opengradient.client.tee_connection.build_ssl_context_from_der",
144-
return_value=MagicMock(spec=ssl.SSLContext),
145-
),
146-
):
147-
conn = RegistryTEEConnection(x402_client=_mock_x402_client(), registry=mock_reg)
132+
conn = _make_registry_connection(registry=mock_reg)
148133

149134
assert conn.get().endpoint == "https://registry.tee"
150135
assert conn.get().tee_id == "tee-42"

0 commit comments

Comments
 (0)