Skip to content

Commit 4daba1a

Browse files
committed
Test coverage for OOBI endpoints
Signed-off-by: pfeairheller <pfeairheller@gmail.com>
1 parent 4081ac0 commit 4daba1a

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

tests/app/test_aiding.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,6 +1302,27 @@ def test_oobi_ends(helpers):
13021302
assert oobis[0] == "http://localhost:1234/oobi/EHgwVwQT15OJvilVvW57HE4w0-GPs_Stj2OFoAHZSysY/controller"
13031303

13041304

1305+
rpy = helpers.endrole(iserder.pre, agent.agentHab.pre, role="mailbox")
1306+
sigs = helpers.sign(salt, 0, 0, rpy.raw)
1307+
body = dict(rpy=rpy.ked, sigs=sigs)
1308+
1309+
res = client.simulate_post(path=f"/identifiers/pal/endroles", json=body)
1310+
op = res.json
1311+
ked = op["response"]
1312+
serder = coring.Serder(ked=ked)
1313+
assert serder.raw == rpy.raw
1314+
1315+
res = client.simulate_get("/identifiers/pal/oobis?role=mailbox")
1316+
assert res.status_code == 200
1317+
role = res.json['role']
1318+
oobis = res.json['oobis']
1319+
1320+
assert role == "mailbox"
1321+
assert len(oobis) == 1
1322+
assert oobis[0] == "http://127.0.0.1:3902/oobi/EHgwVwQT15OJvilVvW57HE4w0-GPs_Stj2OFoAHZSysY/mailbox/EI7AkI40M11MS7lkTCb10JC9-nDt-tXwQh44OHAFlv_9"
1323+
1324+
1325+
13051326
def test_rpy_escow_end(helpers):
13061327
with helpers.openKeria() as (agency, agent, app, client):
13071328
rpyEscrowEnd = RpyEscrowCollectionEnd()

0 commit comments

Comments
 (0)