Пример #1
0
 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))
Пример #2
0
 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)
     )
Пример #3
0
 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))
Пример #4
0
 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))