From b952ef066c556e5d17d321328abe4222f94523ae Mon Sep 17 00:00:00 2001 From: meejah Date: Sat, 13 Jun 2020 00:46:55 -0600 Subject: [PATCH] match query args --- src/allmydata/testing/web.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/allmydata/testing/web.py b/src/allmydata/testing/web.py index 5e6d564fa..3231c5820 100644 --- a/src/allmydata/testing/web.py +++ b/src/allmydata/testing/web.py @@ -177,8 +177,16 @@ class _FakeTahoeUriHandler(Resource, object): def render_GET(self, request): uri = DecodedURL.from_text(request.uri.decode('utf8')) - # XXX FIXME - capability = uri.query[0][1] + capability = None + for arg, value in uri.query: + if arg == u"uri": + capability = value + if capability is None: + raise Exception( + "No ?uri= arguent in GET '{}'".format( + uri.to_string() + ) + ) if self._data is None or capability not in self._data: return u"No data for '{}'".format(capability).decode("ascii")