def test_await(self): x = MagicMock(__await__=Mock()) s = CoroutineProxy(lambda: x) assert s.__await__() is x.__await__.return_value
def coro(self, *, _coro): return CoroutineProxy(lambda: _coro)