<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                [TOC] ### 接口文檔 #### 參數說明 | 參數名 | 是否必須 | 描述 | | --- | --- | --- | | ip | 是 | ip地址 | | sign | 是| 請求簽名,簽名方式:md5(key+ip),key由服務端指定,向將key與ip字符串拼接起來,然后對字符串進行md5加密。| API地址:http://ptqa.com/location 請求方法:POST #### 響應格式范例 ```python {"code": 1, "msg": "success", "data": {"country": "Thailand", "countryCode": "TH", "city": "Bankok", "ipaddress": "171.96.0.127"}} ``` ### python 測試用例示例 ```python import hashlib import requests import pytest def get_sign(ip): key = "Milton_PTQA" m = hashlib.md5(str(key + ip).encode()) sign = m.hexdigest() return sign def post_request(url, params): params["sign"] = get_sign(params["ip"]) resp = requests.post(url, data=params) print(resp.json()) return resp.json() class TestLocation(): def test_location_1(self): """ 用例一""" params = { "ip": "171.96.0.127" } resp = post_request("http://ptqa.com/location", params) assert resp['code'] == 1 def test_location_2(self): """ 用例二""" params = { "ip": "171.96.0.128" } resp = post_request("http://ptqa.com/location", params) assert resp['code'] == 1 if __name__ == '__main__': args = ['-s', '-q'] pytest.main(args) ``` <hr style="margin-top:100px"> :-: ![](https://box.kancloud.cn/2ff0bc02ec938fef8b6dd7b7f16ee11d_258x258.jpg) ***微信掃一掃,關注“python測試開發圈”,了解更多測試教程!***
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看