def METHOD_NAME(self):
    class Awaitable:
        def __await__(self):
            return ('spam',)
    with self.assertWarns(DeprecationWarning):
        @asyncio.coroutine
        def func():
            return Awaitable()
    coro = func()
    self.assertEqual(coro.send(None), 'spam')
    coro.close()