def test_order_add(self): http_url = "http://localhost:7600/call" dictHeader = {} dictHeader["source"] = "UNITTEST1" httpService = HttpService() # result = httpService.http_post(http_url,content, dictHeader) result = httpService.http_get(http_url, dictHeader) print "result=", result
def callInternalWeather(self, token): http_url = "http://apiv3.iucnredlist.org/api/v3/country/list" lendDict = {} lendDict["token"] = token httpService = HttpService() result = httpService.http_get_param_body(http_url, lendDict) print "result=", result return (lendDict, result)
def test_order_add(self): http_url = "http://localhost:7600/orderAdd?id=5&name=abin&age=25&version=0" dictHeader = {} dictHeader["source"] = "UNITTEST1" httpService = HttpService() # result = httpService.http_post(http_url,content, dictHeader) result = httpService.http_get(http_url, dictHeader) print "result=", result
def test_lend_get_body(self): http_url = "http://api.openweathermap.org/data/2.5/weather" input = "London,uk" http_url = http_url + "?" + input print "http_url", http_url httpService = HttpService() result = httpService.http_get_body1(http_url) # result = httpService.http_get_param(http_url,dictOrder, dictHeader) print "result=", result
def test_lend_bank_find_all(self): dictOrder = {} dictOrder["id"] = 1 http_url = "http://localhost:7600/lendBankFindAll" dictHeader = {} dictHeader["source"] = "UNITTEST" httpService = HttpService() result = httpService.http_post(http_url,dictOrder, dictHeader) print "result=", result
def test_order_find_by_Id(self): dictOrder = {} dictOrder["id"] = 48 http_url = "http://localhost:7600/orderFindById" dictHeader = {} dictHeader["source"] = "UNITTEST" httpService = HttpService() result = httpService.http_post(http_url, dictOrder, dictHeader) print "result=", result
def test_order_find_by_param(self): dictOrder = {} dictOrder["key"] = 'name' dictOrder["value"] = 'abin' http_url = "http://localhost:7600/orderFindByParam" dictHeader = {} dictHeader["source"] = "UNITTEST" httpService = HttpService() result = httpService.http_post(http_url, dictOrder, dictHeader) print "result=", result
def test_order_update_by_id(self): dictOrder = {} dictOrder["id"] = 29 dictOrder["key"] = 'name' dictOrder["value"] = 'paul' http_url = "http://localhost:7600/orderUpdateById" dictHeader = {} dictHeader["source"] = "UNITTEST" httpService = HttpService() result = httpService.http_post(http_url, dictOrder, dictHeader) print "result=", result
def test_order_insert(self): dictOrder = {} dictOrder["id"] = 1 dictOrder["name"] = "stevenjohn" dictOrder["age"] = 19 dictOrder["version"] = 0 http_url = "http://localhost:7600/orderInsert" dictHeader = {} dictHeader["source"] = "UNITTEST" httpService = HttpService() result = httpService.http_post(http_url, dictOrder, dictHeader) print "result=", result
def test_team_post_add_params(self): dictOrder = {} dictOrder["id"] = 1 dictOrder["orderId"] = 52 dictOrder["teamName"] = 'KTV' http_url = "http://localhost:7600/teamAdd" content = json.dumps(dictOrder) dictHeader = {} dictHeader["source"] = "UNITTEST1" httpService = HttpService() result = httpService.http_post(http_url, dictOrder, dictHeader) # result = httpService.http_get_param(http_url,dictOrder, dictHeader) print "result=", result
def test_lend_bank_post_add_params(self): dictOrder = {} dictOrder["id"] = 1 dictOrder["bankNo"] = "6228480402564890018" dictOrder["bankName"] = 'ICBC' http_url = "http://localhost:7600/lendBankAdd" content = json.dumps(dictOrder) dictHeader = {} dictHeader["source"] = "UNITTEST1" httpService = HttpService() result = httpService.http_post(http_url,dictOrder, dictHeader) # result = httpService.http_get_param(http_url,dictOrder, dictHeader) print "result=", result
def test_call_ip(self): dictOrder = {} dictOrder["id"] = 1 dictOrder["user_id"] = TimeStampUtil.getTimestamp() dictOrder[ "token"] = '9bb4facb6d23f48efbf424bb05c0c1ef1cf6f468393bc745d42179ac4aca5fee' http_url = "http://localhost:7600/externalIp" content = json.dumps(dictOrder) dictHeader = {} dictHeader["source"] = "UNITTEST1" httpService = HttpService() result = httpService.http_get_body(http_url) # result = httpService.http_get_param(http_url,dictOrder, dictHeader) print "result=", result
def test_order_add_params(self): dictOrder = {} dictOrder["id"] = 1 dictOrder["name"] = "stevenjohn" dictOrder["age"] = 19 dictOrder["version"] = 0 http_url = "http://localhost:7600/orderAdd" content = json.dumps(dictOrder) dictHeader = {} dictHeader["source"] = "UNITTEST1" httpService = HttpService() # result = httpService.http_post(http_url,content, dictHeader) result = httpService.http_get_param(http_url, dictOrder, dictHeader) print "result=", result