From 23e52b12377e921bd5cf3b1d15b413cde24aedd3 Mon Sep 17 00:00:00 2001 From: Itamar Turner-Trauring <itamar@itamarst.org> Date: Thu, 21 Jan 2021 09:58:58 -0500 Subject: [PATCH] Simplify the unit test. --- src/allmydata/test/web/test_web.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/allmydata/test/web/test_web.py b/src/allmydata/test/web/test_web.py index 8dcb7d95b..2f000b7a1 100644 --- a/src/allmydata/test/web/test_web.py +++ b/src/allmydata/test/web/test_web.py @@ -4767,11 +4767,9 @@ class Web(WebMixin, WebErrorMixin, testutil.StallMixin, testutil.ReallyEqualMixi return treq.request(method, self.webish_url + path, persistent=False, **kwargs) - response = yield req("POST", "/uri?format=sdmf&t=mkdir&redirect_to_result=true") - - uri = urllib.unquote(response.request.absoluteURI) - assert 'URI:DIR2:' in uri - dircap = uri[uri.find("URI:DIR2:"):].rstrip('/') + response = yield req("POST", "/uri?format=sdmf&t=mkdir") + dircap = yield response.content() + assert dircap.startswith('URI:DIR2:') dircap_uri = "/uri/?uri={}&t=json".format(urllib.quote(dircap)) response = yield req(