Example #1
0
 def test_with_funding(self):
     profile = orcid2vivo.fetch_orcid_profile("0000-0003-3844-5120")
     self.crosswalker.crosswalk(profile, self.person_uri, self.graph)
     # Verify a grant exists.
     grant_uri = ns.D["grant-742228eecfbdacf092bf482f84151082"]
     self.assertEqual(
         self.graph.value(grant_uri, RDFS.label).toPython(),
         u"The Utility of Ultra High Performance Supercritical Fluid Chromatography for the Analysis of Seized Drugs:"
         u"  Application to Synthetic Cannabinoids and Bath Salts ",
     )
     self.assertEqual(0, len(list(self.graph[grant_uri : ns.VIVO.sponsorAwardId :])))
Example #2
0
 def test_with_funding(self):
     profile = orcid2vivo.fetch_orcid_profile('0000-0003-3844-5120')
     self.crosswalker.crosswalk(profile, self.person_uri, self.graph)
     # Verify a grant exists.
     grant_uri = ns.D['grant-742228eecfbdacf092bf482f84151082']
     self.assertEqual(
         self.graph.value(grant_uri, RDFS.label).toPython(),
         u"The Utility of Ultra High Performance Supercritical Fluid Chromatography for the Analysis of Seized Drugs:"
         u"  Application to Synthetic Cannabinoids and Bath Salts ")
     self.assertEqual(
         0, len(list(self.graph[grant_uri:ns.VIVO.sponsorAwardId:])))
Example #3
0
 def test_with_funding(self):
     profile = orcid2vivo.fetch_orcid_profile("0000-0001-5109-3700")
     self.crosswalker.crosswalk(profile, self.person_uri, self.graph)
     # Verify a grant exists.
     grant_uri = ns.D["grant-9ea22d7c992375778b4a3066f5142624"]
     self.assertEqual(
         self.graph.value(grant_uri, RDFS.label).toPython(),
         u"Policy Implications of International Graduate Students and Postdocs in the United States",
     )
     # Verify three PI roles related to grants for this person uri.
     pi_roles = [guri for guri in self.graph.subjects(predicate=ns.OBO["RO_0000052"], object=self.person_uri)]
     self.assertEqual(len(pi_roles), 3)
Example #4
0
 def test_with_funding(self):
     profile = orcid2vivo.fetch_orcid_profile('0000-0001-5109-3700')
     self.crosswalker.crosswalk(profile, self.person_uri, self.graph)
     # Verify a grant exists.
     grant_uri = ns.D['grant-9ea22d7c992375778b4a3066f5142624']
     self.assertEqual(
         self.graph.value(grant_uri, RDFS.label).toPython(),
         u"Policy Implications of International Graduate Students and Postdocs in the United States"
     )
     # Verify three PI roles related to grants for this person uri.
     pi_roles = [
         guri
         for guri in self.graph.subjects(predicate=ns.OBO['RO_0000052'],
                                         object=self.person_uri)
     ]
     self.assertEqual(len(pi_roles), 3)
Example #5
0
 def test_no_funding(self):
     profile = orcid2vivo.fetch_orcid_profile("0000-0002-7843-9422")
     self.crosswalker.crosswalk(profile, self.person_uri, self.graph)
     # Assert no triples in graph
     self.assertTrue(len(self.graph) == 0)
Example #6
0
 def test_no_funding(self):
     profile = orcid2vivo.fetch_orcid_profile('0000-0002-7843-9422')
     self.crosswalker.crosswalk(profile, self.person_uri, self.graph)
     # Assert no triples in graph
     self.assertTrue(len(self.graph) == 0)