|
56 | 56 | from raiden.transfer.identifiers import CANONICAL_IDENTIFIER_UNORDERED_QUEUE, QueueIdentifier
|
57 | 57 | from raiden.transfer.state import NetworkState
|
58 | 58 | from raiden.transfer.state_change import ActionChannelClose
|
| 59 | +from raiden.utils.capabilities import parse_capabilities |
59 | 60 | from raiden.utils.formatting import to_checksum_address
|
60 | 61 | from raiden.utils.typing import Address, Dict, List, TokenNetworkAddress, cast
|
61 | 62 | from raiden.waiting import wait_for_network_state
|
@@ -1338,9 +1339,15 @@ def test_transport_capabilities(raiden_network: List[RaidenService], retry_timeo
|
1338 | 1339 | app0, app1 = raiden_network
|
1339 | 1340 |
|
1340 | 1341 | app0.transport.immediate_health_check_for(app1.address)
|
1341 |
| - |
1342 | 1342 | app1.transport.immediate_health_check_for(app0.address)
|
1343 | 1343 |
|
1344 | 1344 | wait_for_network_state(app0, app1.address, NetworkState.REACHABLE, retry_timeout)
|
1345 |
| - |
1346 | 1345 | wait_for_network_state(app1, app0.address, NetworkState.REACHABLE, retry_timeout)
|
| 1346 | + |
| 1347 | + app1_user_ids = app0.transport.get_user_ids_for_address(app1.address) |
| 1348 | + assert len(app1_user_ids) == 1, "app1 should have exactly one user_id" |
| 1349 | + app1_user = app0.transport._client.get_user(app1_user_ids.pop()) |
| 1350 | + app1_avatar_url = app1_user.get_avatar_url() |
| 1351 | + assert "adhoc_capability" in app1_avatar_url, "avatar_url not set for app1" |
| 1352 | + msg = "capabilities could not be parsed" |
| 1353 | + assert parse_capabilities(app1_avatar_url) == dict(adhoc_capability=True), msg |
0 commit comments