1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
import json
from globus_sdk.testing import get_last_request, load_response
def test_update_tunnel(client):
meta = load_response(client.update_tunnel).metadata
label = "New Name"
update_doc = {
"data": {
"type": "Tunnel",
"attributes": {
"label": "New Name",
},
}
}
res = client.update_tunnel(meta["tunnel_id"], update_doc)
assert res.http_status == 200
assert res["data"]["type"] == "Tunnel"
req = get_last_request()
sent = json.loads(req.body)
assert sent["data"]["attributes"]["label"] == label
|