예제 #1
0
 def test_put_01_create(self):
     data = 'goodbye world'
     status, msg, body = httpc.put_(self.base_url() + 'goodbye', data=data)
     self.assertEquals(status, 201)
     self.assertEquals(msg.dict['x-put'], 'hello')
     self.assertEquals(body, '')
     self.assertEquals(httpc.get(self.base_url() + 'goodbye'), data)
예제 #2
0
 def test_put_01_create(self):
     data = 'goodbye world'
     status, msg, body = httpc.put_(self.base_url() + 'goodbye',
                                    data=data)
     self.assertEquals(status, 201)
     self.assertEquals(msg.dict['x-put'], 'hello')
     self.assertEquals(body, '')
     self.assertEquals(httpc.get(self.base_url() + 'goodbye'), data)
예제 #3
0
 def test_put_02_modify(self):
     self.test_put_01_create()
     data = 'i really mean goodbye'
     status = httpc.put_(self.base_url() + 'goodbye', data=data)[0]
     self.assertEquals(status, 204)
     self.assertEquals(httpc.get(self.base_url() + 'goodbye'), data)
예제 #4
0
 def test_put_02_modify(self):
     self.test_put_01_create()
     data = 'i really mean goodbye'
     status = httpc.put_(self.base_url() + 'goodbye', data=data)[0]
     self.assertEquals(status, 204)
     self.assertEquals(httpc.get(self.base_url() + 'goodbye'), data)