示例#1
0
 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))
示例#2
0
    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)
示例#3
0
    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)
示例#4
0
 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)