summaryrefslogtreecommitdiff
path: root/test/utils/httpservermock.py
diff options
context:
space:
mode:
authorIwan Aucamp <aucampia@gmail.com>2023-03-26 12:53:29 +0200
committerGitHub <noreply@github.com>2023-03-26 12:53:29 +0200
commit57bb42886b57a37f1ba93a4d1b52651d978d049c (patch)
treeac75957fa29dc49c39618b01fcc9dda29bcb4ea9 /test/utils/httpservermock.py
parent4da67f9a17ffe8fa128afcdd2259e337bccafaa3 (diff)
downloadrdflib-57bb42886b57a37f1ba93a4d1b52651d978d049c.tar.gz
fix: restore the 6.1.1 default bound namespaces (#2313)
The namespaces bound by default by `rdflib.graph.Graph` and `rdflib.namespace.NamespaceManager` was reduced in version 6.2.0 of RDFLib, however, this also would cause code that worked with 6.1.1 to break, so this constituted a breaking change. This change restores the previous behaviour, binding the same namespaces as was bound in 6.1.1. To bind a reduced set of namespaces, the `bind_namespaces` parameter of `rdflib.graph.Graph` or `rdflib.namespace.NamespaceManager` can be used. - Closes <https://github.com/RDFLib/rdflib/issues/2103>.
Diffstat (limited to 'test/utils/httpservermock.py')
-rw-r--r--test/utils/httpservermock.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/utils/httpservermock.py b/test/utils/httpservermock.py
index 54596feb..6a87bf19 100644
--- a/test/utils/httpservermock.py
+++ b/test/utils/httpservermock.py
@@ -96,7 +96,10 @@ class BaseHTTPServerMock:
logging.debug("headers %s", request.headers)
requests[method_name].append(request)
- response = responses[method_name].pop(0)
+ try:
+ response = responses[method_name].pop(0)
+ except IndexError as error:
+ raise ValueError(f"No response for {method_name} request") from error
handler.send_response(response.status_code, response.reason_phrase)
apply_headers_to(response.headers, handler)
handler.end_headers()