def test_do_delete(self): httpretty.register_uri(httpretty.DELETE, self.uri, status=self.status_ok, body=json.dumps(self.resp)) cert_store = Client(self.apikey, self.cert_path, self.uri) cert_store.set_url() result = cert_store.do_delete(self.header) content = json.loads(result.content) self.assertEqual(self.status_ok, result.status_code) self.assertEqual(0, content["ErrCode"])
def test_do_delete(self): httpretty.register_uri(httpretty.DELETE, self.uri, status=self.status_ok, body=json.dumps(self.resp)) cert_store = Client( self.apikey, #self.cert_path, self.sig_param, self.uri, True, cert=('./tls/client.pem', './tls/client.key'), cacert='./tls/ca.crt') # cert_store.set_url() result = cert_store.do_delete(self.uri, self.header) content = json.loads(result.content) self.assertEqual(self.status_ok, result.status_code) self.assertEqual(0, content["ErrCode"])