def test_person_by_surrogate_id(self): with self.settings( RESTCLIENTS_NWS_DAO_CLASS='restclients.dao_implementation.nws.File'): nws = NWS() person = nws.get_person_by_surrogate_id("*****@*****.**") self._assert_person_matches(person) self.assertEquals(2, len(person.endpoints))
def test_create_person(self): with self.settings(RESTCLIENTS_NWS_DAO_CLASS= 'restclients.dao_implementation.nws.File'): nws = NWS() person = nws.get_person_by_surrogate_id("*****@*****.**") person.person_id = None person.endpoints = None response_status = nws.create_new_person(person) self.assertEquals(201, response_status)
def test_create_person(self): with self.settings( RESTCLIENTS_NWS_DAO_CLASS='restclients.dao_implementation.nws.File'): nws = NWS() person = nws.get_person_by_surrogate_id("*****@*****.**") person.person_id = None person.endpoints = None response_status = nws.create_new_person(person) self.assertEquals(201, response_status)
def test_person_by_surrogate_id(self): with self.settings(RESTCLIENTS_NWS_DAO_CLASS= 'restclients.dao_implementation.nws.File'): nws = NWS() person = nws.get_person_by_surrogate_id("*****@*****.**") self._assert_person_matches(person)