Add tests for issue #1299 by aucampia · Pull Request #1328 · RDFLib/rdflib (original) (raw)
These tests confirm that bound namespaces occur
exactly once in SPARQL queries when using SPARQLStore.
Closes #1299 (Issue does not exist, this just adds tests to confirm it does not exists)
Proposed Changes
- Check that query argument to
rdflib.plugins.stores.sparqlstore.SPARQLConnector.query
contains bound namespaces exactly once. - Add Mock HTTP server based tests for queries to SPARQLStore that confirms the query send to the server contains bound namespaces exactly once.
I think the mock server based test is better, and ideally this should replace all the test that queries http://dbpedia.org/sparql, but it adds about 0.5 seconds to tests as it stands, so maybe it is not ideal. If you want only one of the two approaches let me know and I will remove the other.