def test_leaving(raiden_network, token_addresses):
token_address = token_addresses[0]
connection_managers = [
app.raiden.connection_manager_for_token(token_address) for app in raiden_network
]
all_channels = list(
itertools.chain.from_iterable(
connection_manager.receiving_channels for connection_manager in connection_managers
)
)
leaving_async = [
app.raiden.leave_all_token_networks_async() for app in raiden_network[1:]
]
gevent.wait(leaving_async, timeout=50)
assert not connection_managers[0].receiving_channels
assert all(
channel.state == CHANNEL_STATE_SETTLED
for channel in all_channels
)
评论列表
文章目录