示例#1
0
    def tearDown(self):
        try:
            params = '/' + id
            response = restclient.delete(serviceUrl=serviceUrl, params=params)
        except:
            pass

        try:
            params = '/' + hive_id
            response = restclient.delete(serviceUrl=hiveServiceUrl, params=params)
        except:
            pass
示例#2
0
    def tearDown(self):
        try:
            params = '/' + id
            response = restclient.delete(serviceUrl=serviceUrl, params=params)
        except:
            pass

        try:
            params = '/' + hive_id
            response = restclient.delete(serviceUrl=hiveServiceUrl,
                                         params=params)
        except:
            pass
示例#3
0
 def testDelNoParamsErr(self):
     print "HTTP DELETE: no params"
     try:
         response = restclient.delete(serviceUrl=serviceUrl)
         print response.read()
         assert False, "received unexpected successful response"
     except urllib2.HTTPError, e:
         print e.read()
         assert e.code == 400, "received unexpected unsuccessful response"
示例#4
0
 def testDelNoParamsErr(self):
     print "HTTP DELETE: no params"
     try:
         response = restclient.delete(serviceUrl=serviceUrl)
         print response.read()
         assert False, "received unexpected successful response"
     except urllib2.HTTPError, e:
         print e.read()
         assert e.code == 400, "received unexpected unsuccessful response"
示例#5
0
 def testDelWrongParamsErr(self):
     print "HTTP DELETE: wrong params"
     params = '/does_not_exist'
     try:
         response = restclient.delete(serviceUrl=serviceUrl, params=params)
         print response.read()
         assert False, "received unexpected successful response"
     except urllib2.HTTPError, e:
         print e.read()
         assert e.code == 404, "received unexpected unsuccessful response"
示例#6
0
 def testDelWrongParamsErr(self):
     print "HTTP DELETE: wrong params"
     params = '/does_not_exist'
     try:
         response = restclient.delete(serviceUrl=serviceUrl, params=params)
         print response.read()
         assert False, "received unexpected successful response"
     except urllib2.HTTPError, e:
         print e.read()
         assert e.code == 404, "received unexpected unsuccessful response"
示例#7
0
 def testDel(self):
     print "HTTP DELETE: deleting entry"
     params = '/' + id
     response = restclient.delete(serviceUrl=serviceUrl, params=params)
     print response.code
     assert response.code == 200, "can't delete entry"
示例#8
0
 def delTest(self):
     print "HTTP DELETE: deleting entry"
     params = '/' + id
     response = restclient.delete(serviceUrl=serviceUrl, params=params)
     print response.code
     assert response.code == 200, "can't delete entry"
示例#9
0
def testKillJob(jobID):
    print "Testing job kill"
    params = '/' + jobID
    response = restclient.delete(serviceUrl=serviceUrl, params=params)
    print response.read()
示例#10
0
def deletecase(case,sso_cookie):
    body = get_body(case)
    headers = case.headers
    resp = restclient.delete(case.url, sso_cookie, headers=headers)
    return resp