def datagraph_sparql_mapped_url(self): """ the URL to GET for executing a SPARQL query that returns the mapped graph data """ from webui.cnmain.utils import get_sparql_query_graph query = get_sparql_query_graph(self.datagraph_mapped_name) return reverse('sparql') + '?' + urlencode(dict(query=query))
def test_contains_sparql_datagraph_mapped_query(self): from webui.cnmain.utils import get_sparql_query_graph query = get_sparql_query_graph(self.archive_item.datagraph_mapped_name) response = self.client.get(self.archive_item.get_absolute_url()) self.assertContains( response, '<a href="/sparql/?query=' + quote_plus(query) )
def test_contains_sparql_datagraph_mapped_query(self): from webui.cnmain.utils import get_sparql_query_graph query = get_sparql_query_graph(self.archive_item.datagraph_mapped_name) response = self.client.get(self.archive_item.get_absolute_url()) self.assertContains(response, '<a href="/sparql/?query=' + quote_plus(query))