add watchvalue test and some more routing context convenience functions

This commit is contained in:
Christien Rioux 2024-03-17 16:00:34 -04:00
parent 30cc4a814b
commit b51c660b9c
7 changed files with 174 additions and 19 deletions

View file

@ -218,14 +218,14 @@ async def test_watch_dht_values(api_connection: veilid.VeilidAPI):
vd = await rc.set_dht_value(rec.key, 3, b"BLAH")
assert vd == None
all_gone = await rc.cancel_dht_watch(rec.key, [(0, 2)])
assert all_gone == True
still_active = await rc.cancel_dht_watch(rec.key, [(0, 2)])
assert still_active == True
vd = await rc.set_dht_value(rec.key, 3, b"BLAH BLAH BLAH")
assert vd == None
all_gone = await rc.cancel_dht_watch(rec.key, [(3, 9)])
assert all_gone == False
still_active = await rc.cancel_dht_watch(rec.key, [(3, 9)])
assert still_active == False
vd = await rc.set_dht_value(rec.key, 3, b"BLAH")
assert vd == None