@@ -0,0 +1,1755 @@
+import pytest%0A%0Afrom oslash.either import Right%0A%0Afrom jsonrpcserver.async_dispatcher import (%0A    call,%0A    dispatch_deserialized,%0A    dispatch_request,%0A    dispatch_to_response_pure,%0A)%0Afrom jsonrpcserver.async_main import default_deserializer, default_schema_validator%0Afrom jsonrpcserver.dispatcher import DispatchResult%0Afrom jsonrpcserver.methods import Methods%0Afrom jsonrpcserver.request import Request%0Afrom jsonrpcserver.response import SuccessResponse%0Afrom jsonrpcserver.result import Result, Success, SuccessResult%0Afrom jsonrpcserver.utils import identity%0A%0A%0Aasync def ping() -%3E Result:%0A    return Success(%22pong%22)%0A%0A%0A@pytest.mark.asyncio%0Aasync def test_call():%0A    assert await call(Request(%22ping%22, %5B%5D, 1), None, ping) == Right(%0A        SuccessResult(%22pong%22)%0A    )%0A%0A%0A@pytest.mark.asyncio%0Aasync def test_dispatch_request():%0A    request = Request(%22ping%22, %5B%5D, 1)%0A    assert await dispatch_request(Methods(ping), None, request) == DispatchResult(%0A        request, Right(SuccessResult(%22pong%22))%0A    )%0A%0A%0A@pytest.mark.asyncio%0Aasync def test_dispatch_deserialized():%0A    assert (%0A        await dispatch_deserialized(%0A            Methods(ping),%0A            None,%0A            identity,%0A            %7B%22jsonrpc%22: %222.0%22, %22method%22: %22ping%22, %22id%22: 1%7D,%0A        )%0A        == Right(SuccessResponse(%22pong%22, 1))%0A    )%0A%0A%0A@pytest.mark.asyncio%0Aasync def test_dispatch_to_response_pure_success():%0A    assert (%0A        await dispatch_to_response_pure(%0A            deserializer=default_deserializer,%0A            schema_validator=default_schema_validator,%0A            post_process=identity,%0A            context=None,%0A            methods=Methods(ping),%0A            request='%7B%22jsonrpc%22: %222.0%22, %22method%22: %22ping%22, %22id%22: 1%7D',%0A        )%0A        == Right(SuccessResponse(%22pong%22, 1))%0A    )%0A

Add tests for the asyncio dispatcher (#191)