def test_basic_call_on_method_registering_without_decorator_coroutine():
 class API(object, ):
  def __init__(self):
   hug.call()(self.hello_world_method)
  @asyncio.coroutine
  def hello_world_method(self):
   return 'Hello World!'
 api_instance = API()
 assert (loop.run_until_complete(api_instance.hello_world_method()) == 'Hello World!')
 assert (hug.test.get(api, '/hello_world_method').data == 'Hello World!')

def test_basic_call_on_method_registering_without_decorator_coroutine ( ) : class API ( object , ) : def __init__ ( self ) : hug . call ( ) ( self . hello_world_method ) @ asyncio . coroutine def hello_world_method ( self ) : return 'Hello World!' api_instance = API ( ) assert ( loop . run_until_complete ( api_instance . hello_world_method ( ) ) == 'Hello World!' ) assert ( hug . test . get ( api , '/hello_world_method' ) . data == 'Hello World!' )
test to ensure instance method calling via async works as expected .