diff --git a/src/Nirum/Targets/Python.hs b/src/Nirum/Targets/Python.hs index 8fdb663..952c371 100644 --- a/src/Nirum/Targets/Python.hs +++ b/src/Nirum/Targets/Python.hs @@ -1123,6 +1123,9 @@ class {className}_Client($className): self.__nirum_transport__ = transport # type: transport_type {clientMethods'} + +{className}.Client = {className}_Client +{className}.Client.__qualname__ = '{className}.Client' |] where nirumMapName :: T.Text diff --git a/test/python/service_test.py b/test/python/service_test.py index ca8d3f7..a0cdcf4 100644 --- a/test/python/service_test.py +++ b/test/python/service_test.py @@ -3,7 +3,7 @@ from nirum.transport import Transport from fixture.foo import (Dog, Gender, PingService, Product, RpcError, - SampleService_Client, Way) + SampleService, SampleService_Client, Way) def test_throws_error(): @@ -48,7 +48,8 @@ def latest_call(self): def test_service_client_payload_serialization(): t = DumbTransport() - c = SampleService_Client(t) + c = SampleService.Client(t) + assert SampleService_Client is SampleService.Client c.sample_method( a=Dog(name=u'Dog.name', age=3), b=Product(name=u'Product.name', sale=False),