Exemplo n.º 1
0
 def test_handle_file(self):
     ingester = ZoteroIngest(self.rdf_path)
     ingester.graph = self.g
     predicate, values = ingester.handle_link(RSS.link, self.doc2)
     values = dict(values)
     self.assertIn('link', values)
     self.assertEqual(values['link'], self.link.replace('file://', ''))
Exemplo n.º 2
0
 def test_handle_link(self):
     ingester = ZoteroIngest(self.rdf_path)
     ingester.graph = self.g
     predicate, values = ingester.handle_link(RSS.link, self.doc)
     values = dict(values)
     self.assertIn('url', values)
     self.assertEqual(
         values['url'], self.location,
         "The URI of the link target should be interpreted as an URL.")
     self.assertIsInstance(
         values[DCTERMS.dateSubmitted.toPython()], datetime.datetime,
         "dateSubmitted should be recast as a datetime object.")