def test_basic_call_on_method_coroutine():
 class API(object, ):
  @hug.call()
  @asyncio.coroutine
  def hello_world(self=None):
   return 'Hello World!'
 api_instance = API()
 assert api_instance.hello_world.interface.http
 assert (loop.run_until_complete(api_instance.hello_world()) == 'Hello World!')
 assert (hug.test.get(api, '/hello_world').data == 'Hello World!')

def test_basic_call_on_method_coroutine ( ) : class API ( object , ) : @ hug . call ( ) @ asyncio . coroutine def hello_world ( self = None ) : return 'Hello World!' api_instance = API ( ) assert api_instance . hello_world . interface . http assert ( loop . run_until_complete ( api_instance . hello_world ( ) ) == 'Hello World!' ) assert ( hug . test . get ( api , '/hello_world' ) . data == 'Hello World!' )
test to ensure the most basic call still works if applied to a method .