aboutsummaryrefslogtreecommitdiff
path: root/test/py/test_negotiate.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/py/test_negotiate.py')
-rw-r--r--test/py/test_negotiate.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/py/test_negotiate.py b/test/py/test_negotiate.py
index b018840..7404902 100644
--- a/test/py/test_negotiate.py
+++ b/test/py/test_negotiate.py
@@ -161,15 +161,15 @@ def test_invalid_json_bad_pgsize2():
def test_valid_negotiate_no_json():
- sock = connect_sock()
+ client = Client(sock=connect_sock())
payload = struct.pack("HH", LIBVFIO_USER_MAJOR, LIBVFIO_USER_MINOR)
hdr = vfio_user_header(VFIO_USER_VERSION, size=len(payload))
- sock.send(hdr + payload)
+ client.sock.send(hdr + payload)
vfu_attach_ctx(ctx)
- payload = get_reply(sock)
+ payload = get_reply(client.sock)
(major, minor, json_str, _) = struct.unpack("HH%dsc" % (len(payload) - 5),
payload)
assert major == LIBVFIO_USER_MAJOR
@@ -179,7 +179,7 @@ def test_valid_negotiate_no_json():
assert json.capabilities.max_data_xfer_size == SERVER_MAX_DATA_XFER_SIZE
# FIXME: migration object checks
- disconnect_client(ctx, sock)
+ client.disconnect(ctx)
def test_valid_negotiate_empty_json():