Skip to content

Commit adb02cd

Browse files
committed
fixing tests
1 parent 1a6b91b commit adb02cd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tests/server/test_integration.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@
2929
Artifact,
3030
DataPart,
3131
InternalError,
32+
InvalidParamsError,
3233
InvalidRequestError,
3334
JSONParseError,
3435
Message,
36+
MethodNotFoundError,
3537
Part,
3638
PushNotificationConfig,
3739
Role,
@@ -976,7 +978,7 @@ def test_unknown_method(client: TestClient):
976978
data = response.json()
977979
assert 'error' in data
978980
# This should produce an UnsupportedOperationError error code
979-
assert data['error']['code'] == InvalidRequestError().code
981+
assert data['error']['code'] == MethodNotFoundError().code
980982

981983

982984
def test_validation_error(client: TestClient):
@@ -987,7 +989,7 @@ def test_validation_error(client: TestClient):
987989
json={
988990
'jsonrpc': '2.0',
989991
'id': '123',
990-
'method': 'messages/send',
992+
'method': 'message/send',
991993
'params': {
992994
'message': {
993995
# Missing required fields
@@ -999,7 +1001,7 @@ def test_validation_error(client: TestClient):
9991001
assert response.status_code == 200
10001002
data = response.json()
10011003
assert 'error' in data
1002-
assert data['error']['code'] == InvalidRequestError().code
1004+
assert data['error']['code'] == InvalidParamsError().code
10031005

10041006

10051007
def test_unhandled_exception(client: TestClient, handler: mock.AsyncMock):

0 commit comments

Comments
 (0)