예제 #1
0
 def delete(port, url, au):
     http = HttpSession(base + ":" + port)
     data = http.delete(url,
                        headers={
                            'Authorization': au,
                            'Content-Type': 'application/json',
                            'accept': 'application/json'
                        })
     return data
예제 #2
0
 def delete(port, url, au):
     # data = requests.delete(url, data=data, headers={'Authorization': au, 'Content-Type': 'application/json',
     #                                      'accept': 'application/msgpack'})
     http = HttpSession(base + ":" + port)
     data = http.delete(url,
                        headers={
                            'Authorization': au,
                            'Content-Type': 'application/json',
                            'accept': 'application/msgpack'
                        })
     if data.status_code == 400:
         return Http_esponseDecode(data)
     else:
         return data
예제 #3
0
 def test_delete(self):
     s = HttpSession("http://127.0.0.1:%i" % self.port)
     r = s.delete("/request_method")
     self.assertEqual(200, r.status_code)
     self.assertEqual("DELETE", r.content.decode())
예제 #4
0
 def test_delete(self):
     s = HttpSession("http://127.0.0.1:%i" % self.port)
     r = s.delete("/request_method")
     self.assertEqual(200, r.status_code)
     self.assertEqual("DELETE", r.content.decode())