From f7c999a16b50c3cc4d4b39decd0a761e43e90241 Mon Sep 17 00:00:00 2001 From: Ano-sys Date: Sun, 12 Jan 2025 00:01:25 +0100 Subject: [PATCH] Added simplifying comments --- test/test_praxis2.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/test_praxis2.py b/test/test_praxis2.py index 2170d6f..caa0ccf 100644 --- a/test/test_praxis2.py +++ b/test/test_praxis2.py @@ -312,31 +312,31 @@ def test_dht(static_peer): )) # Ensure datum is missing - contact = peers[contact_order[0]] + contact = peers[contact_order[0]] # 18804 with pytest.raises(req.HTTPError) as exception_info: util.urlopen(f'http://{contact.ip}:{contact.port}/dynamic/{datum}') assert exception_info.value.status == 404, f"'/dynamic/{datum}' should be missing, but GET was not answered with '404'" # Create datum - contact = peers[contact_order[1]] + contact = peers[contact_order[1]] # 10927 reply = util.urlopen(req.Request(f'http://{contact.ip}:{contact.port}/dynamic/{datum}', data=content, method='PUT')) assert reply.status == 201, f"Creation of '/dynamic/{datum}' did not yield '201'" # Ensure datum exists - contact = peers[contact_order[2]] + contact = peers[contact_order[2]] # 54536 reply = util.urlopen(f'http://{contact.ip}:{contact.port}/dynamic/{datum}') assert reply.status == 200 assert reply.read() == content, f"Content of '/dynamic/{datum}' does not match what was passed" # Delete datum - contact = peers[contact_order[3]] + contact = peers[contact_order[3]] # 40809 real_url = util.urlopen(f'http://{contact.ip}:{contact.port}/dynamic/{datum}').geturl() # Determine correct URL reply = util.urlopen(req.Request(real_url, method='DELETE')) assert reply.status in {200, 202, 204}, f"Deletion of '/dynamic/{datum}' did not succeed" # Ensure datum is missing - contact = peers[contact_order[4]] + contact = peers[contact_order[4]] # 63901 with pytest.raises(req.HTTPError) as exception_info: util.urlopen(f'http://{contact.ip}:{contact.port}/dynamic/{datum}')