def _save_person_in_KG(self, first_name, last_name, email):
     person = Person(family_name=last_name,
                     given_name=first_name,
                     email=email,
                     affiliation='')
     if not person.exists(NAR_client):
         person.save(NAR_client)
         logger.debug('saved in KG: %s', person)
     else:
         logger.debug('already exists in KG: %s', person)
Beispiel #2
0
 def test_save_new(self, kg_client, monkeypatch):
     new_p = Person("Ride", "Sally", "*****@*****.**")
     monkeypatch.setattr(Person,
                         "exists",
                         lambda self, kg_client, api='any': False)
     new_p.save(kg_client)