Exemplo n.º 1
0
 def test_identifier_filter_special_arXiv(self):
     """oaiharvest - testing identifier filter for arXiv."""
     from invenio.legacy.oaiharvest.daemon import get_identifier_names
     self.assertEqual(get_identifier_names("oai:arxiv.org:1234.1245"),
                      ["oai:arXiv.org:1234.1245"])
     self.assertEqual(get_identifier_names("oai:arXiv.org:1234.1245, arXiv:1234.1245"),
                      ["oai:arXiv.org:1234.1245", "oai:arXiv.org:1234.1245"])
     self.assertEqual(get_identifier_names("oai:arXiv.org:1234.12452"),
                      ["oai:arXiv.org:1234.12452"])
Exemplo n.º 2
0
 def test_identifier_filter(self):
     """oaiharvest - testing identifier filter."""
     from invenio.legacy.oaiharvest.daemon import get_identifier_names
     self.assertEqual(get_identifier_names("oai:mysite.com:1234"),
                      ["oai:mysite.com:1234"])
     self.assertEqual(get_identifier_names("oai:mysite.com:1234, oai:example.com:2134"),
                      ["oai:mysite.com:1234", "oai:example.com:2134"])
     self.assertEqual(get_identifier_names("oai:mysite.com:1234/testing, oai:example.com:record/1234"),
                      ["oai:mysite.com:1234/testing", "oai:example.com:record/1234"])