Commit 2b7dce17077a697e355dde58cad6292f82cdc471

Authored by lixi
2 parents 84136940 b2316d07

Merge remote-tracking branch 'origin/master'

commons/api/fc_add.py
... ... @@ -29,8 +29,8 @@ class fc_add():
29 29 self.body = fc_add.body
30 30  
31 31  
32   -# fc=FeedbackCustomerController()
33   -# print(fc.body)
34   -# re=my.post(url=fc.url,data=fc.body.encode('utf-8'),headers=fc.header)
35   -# print(re.json())
36   -# print(re.headers)
37 32 \ No newline at end of file
  33 +fc = fc_add()
  34 +print(fc.body)
  35 +re = my.post(url = fc.url,data = fc.body.encode('utf-8'),headers = fc.header)
  36 +print(re.json())
  37 +print(re.headers)
38 38 \ No newline at end of file
... ...
commons/api/fc_view.py
... ... @@ -25,9 +25,9 @@ class fc_view():
25 25 }
26 26  
27 27 def __init__(self):
28   - self.url=fc_view.url.replace("http://test.",com.get_global_config("global_data", "environment", "en") )
29   - self.header=fc_view.header
  28 + self.url = fc_view.url.replace("http://test.",com.get_global_config("global_data", "environment", "en") )
  29 + self.header = fc_view.header
30 30  
31 31 fc = fc_view()
32   -re=my.get(url=fc.url,headers=fc.header)
  32 +re = my.get(url=fc.url,headers = fc.header)
33 33 print(re.text)
34 34 \ No newline at end of file
... ...
commons/api/feedback_customer_disable.py
... ... @@ -12,16 +12,15 @@ class feedback_customer_disable():
12 12 url = "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/disable.action?id=44"
13 13  
14 14 header = {
15   - "Host": "test.jmsf.diligrp.com:8385", "Connection": "keep-alive", "Content-Length": "0",
16   - "Accept": "application/json,text/javascript,*/*;q=0.01", "Origin": "http://test.jmsf.diligrp.com:8385",
17   - "X-Requested-With": "XMLHttpRequest",
18   - "User-Agent": "Mozilla/5.0(WindowsNT6.2;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/84.0.4147.105Safari/537.36",
19   - "Accept-Language": "zh-CN,zh;q=0.9",
20   - "Referer": "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/list",
21   - "Accept-Encoding": "gzip,deflate",
22   - "Cookie": "UAP_refreshToken=0e205e78-a656-4a85-a2ba-7226ce898ae5;UAP_firmId=9;UAP_accessToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJXRUIiLCJuYmYiOjE2Mjc4OTI3MzYsImRhdGEiOiJ7XCJjZWxscGhvbmVcIjpcIjE1NTI2MzY0NDU2XCIsXCJjcmVhdGVkXCI6MTYwODc5NTk0OTAwMCxcImRlcGFydG1lbnRJZFwiOjU2LFwiZW1haWxcIjpcInNoZW55YW5nQGRpbGlncnAuY29tXCIsXCJmaXJtQ29kZVwiOlwic3lcIixcImZpcm1JZFwiOjksXCJmaXJtTmFtZVwiOlwi5rKI6Ziz5Zyw5Yip5Yac5om55biC5Zy65a6i5oi355S15a2Q57uT566X5Lit5b-DXCIsXCJpZFwiOjI1MSxcImxhc3RMb2dpblRpbWVcIjoxNjI3ODY1NTc3OTg5LFwibWV0YWRhdGFcIjp7fSxcIm1vZGlmaWVkXCI6MTYyNjE2MzAwNDAwMCxcInBhc3N3b3JkXCI6XCIxODk2NUVCNzJDOTJBNTQ5RERcIixcInJlYWxOYW1lXCI6XCLmsojpmLNcIixcInNlcmlhbE51bWJlclwiOlwiMDAwXCIsXCJzdGF0ZVwiOjEsXCJzeXN0ZW1UeXBlXCI6MSxcInVzZXJOYW1lXCI6XCI0NDQ0NDRcIn0iLCJpc3MiOiJVQVBfQVVUSDAiLCJleHAiOjE2Mjc4OTQ1MzYsImlhdCI6MTYyNzg5MjczNiwianRpIjoiNDYzMTY0MTUtYmUzYy00NTkzLWI3ODctYjRhZmI3MDQ1ODFiIn0.N5kEGcM9CR09wc3G7fLE0TwkdvO-hM3HQPKEFDUmdmewk-7iHlbzMHuRiY-Z_hPBbhv1v9y8Ibvyh6T6gikkt7C0movQ-oCqdNY-hzOrBZk9Ht-6mbf69zZKHOJv0TXcSs3y265eVviVbgZG6TgrptXWdSBvSt_Q94sfbMsQ7SA"
23   -
  15 + "Host": "test.jmsf.diligrp.com:8385", "Connection": "keep-alive", "Content-Length": "0",
  16 + "Accept": "application/json,text/javascript,*/*;q=0.01", "Origin": "http://test.jmsf.diligrp.com:8385",
  17 + "X-Requested-With": "XMLHttpRequest",
  18 + "User-Agent": "Mozilla/5.0(WindowsNT6.2;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/84.0.4147.105Safari/537.36",
  19 + "Accept-Language": "zh-CN,zh;q=0.9",
  20 + "Referer": "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/list",
  21 + "Accept-Encoding": "gzip,deflate"
24 22 }
  23 +
25 24 def __init__(self):
26 25 self.url = feedback_customer_disable.url.replace("http://test.", com.get_global_config("global_data", "environment", "en"))
27 26 self.header = feedback_customer_disable.header
... ...
commons/api/feedback_customer_enable.py
1 1 # -*- coding: utf-8 -*-
2 2 """
3   -@Time : 2021/7/30 9:56
  3 +@Time : 2021/8/3 8:56
4 4 @Auth : wlm
5 5 @File :feedback_customer_enable.py
6 6 @IDE :PyCharm
7 7 """
  8 +from commons import common as com
  9 +from commons.MySession import my
  10 +
  11 +class feedback_customer_enable():
  12 + url = "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/enable.action?id=49"
  13 +
  14 + header = {
  15 + "Host": "test.jmsf.diligrp.com:8385", "Connection": "keep-alive", "Content-Length": "0",
  16 + "Accept": "application/json,text/javascript,*/*;q=0.01", "Origin": "http://test.jmsf.diligrp.com:8385",
  17 + "X-Requested-With": "XMLHttpRequest",
  18 + "User-Agent": "Mozilla/5.0(WindowsNT6.2;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/84.0.4147.105Safari/537.36",
  19 + "Accept-Language": "zh-CN,zh;q=0.9",
  20 + "Referer": "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/list",
  21 + "Accept-Encoding": "gzip,deflate"
  22 + }
  23 + def __init__(self):
  24 + self.url = feedback_customer_enable.url.replace("http://test.", com.get_global_config("global_data", "environment", "en"))
  25 + self.header = feedback_customer_enable.header
  26 +
  27 +fce = feedback_customer_enable()
  28 +re = my.post(url=fce.url, headers=fce.header)
  29 +print(re.json())
8 30 \ No newline at end of file
... ...
commons/api/feedback_customer_query.py 0 → 100644
  1 +# -*- coding: utf-8 -*-
  2 +"""
  3 +@Time : 2021/8/3 9:11
  4 +@Auth : wlm
  5 +@File :feedback_customer_query.py
  6 +@IDE :PyCharm
  7 +"""
  8 +import kwargs as kwargs
  9 +
  10 +from commons import common as com
  11 +from commons.MySession import my,sy1
  12 +
  13 +class feedback_customer_query():
  14 + url = "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/list.action"
  15 +
  16 + header = {
  17 + "Host": "test.jmsf.diligrp.com:8385",
  18 + "Connection": "keep-alive",
  19 + "Content-Length": "0",
  20 + "Accept": "application/json,text/javascript,*/*;q=0.01", "Origin": "http://test.jmsf.diligrp.com:8385",
  21 + "X-Requested-With": "XMLHttpRequest",
  22 + "User-Agent": "Mozilla/5.0(WindowsNT6.2;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/84.0.4147.105Safari/537.36",
  23 + "Accept-Language": "zh-CN,zh;q=0.9",
  24 + "Referer": "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/list",
  25 + "Accept-Encoding": "gzip,deflate",
  26 + "Content-Type": "application/x-www-form-urlencoded",
  27 + }
  28 +
  29 + body = '''rows=10&page=1&sort=id&order=desc&metadata[created]=[provider=datetimeProvider&index=10&field=created]
  30 + &metadata[status]=[provider=stateProvider&index=20&field=status]
  31 + &metadata[created] = {"provider": "datetimeProvider", "index": 10, "field": "created"}
  32 + &metadata[status] = {"provider": "stateProvider", "index": 20, "field": "status"}
  33 + &name=史芳&reatedStart=2021-08-02 00:00:00&createdEnd=2021-08-03 23:59:59'''
  34 +
  35 +
  36 +
  37 +
  38 + # body = "rows=10&page=1&sort=id&order=desc&\
  39 + # metadata[created]=[provider=datetimeProvider&index=10&field=created]\
  40 + # &metadata[status]=[provider=stateProvider&index=20&field=status]\
  41 + # &name=史芳&reatedStart=2021-08-02 00:00:00&createdEnd=2021-08-03 23:59:59"
  42 + # body = {
  43 + # "rows":"10",
  44 + # "page":"1",
  45 + # "sort":"id",
  46 + # "order":"desc",
  47 + # "metadata[created]": {"provider": "datetimeProvider", "index": 10, "field": "created"},
  48 + # "metadata[status]": {"provider": "stateProvider", "index": 20, "field": "status"},
  49 + # "name": "史芳",
  50 + # "createdStart":"2021-08-02 00:00:00",
  51 + # "createdEnd":"2021-08-03 23:59:59",
  52 + # }
  53 + # body = dict(body)
  54 + # body["metadata[created]"] = json.dumps(body["metadata[created]"])
  55 + # body["metadata[status]"] = json.dumps(body["metadata[status]"])
  56 +
  57 +
  58 + # "metadata[created]": {"provider": "datetimeProvider", "index": 10, "field": "created"},
  59 + # "metadata[status]": {"provider": "stateProvider", "index": 20, "field": "status"},
  60 + # body = json.dumps(body).encode('utf-8')
  61 +
  62 + def __init__(self):
  63 + self.url = feedback_customer_query.url.replace("http://test.", com.get_global_config("global_data", "environment", "en"))
  64 + self.header = feedback_customer_query.header
  65 + self.body = feedback_customer_query.body
  66 + print(self.body)
  67 +# feedback_customer_query = urllib.parse.urlencode(feedback_customer_query())
  68 +
  69 +# fcq = feedback_customer_query
  70 +# print(fcq.body)
  71 +# re = sy1.post(url = fcq.url, data = fcq.body.encode('utf-8'),headers = fcq.header,proxies=my.myproxies)
  72 +# print(re.text)
0 73 \ No newline at end of file
... ...
commons/api/feedback_order_settlement.py
... ... @@ -6,7 +6,7 @@
6 6 @IDE :PyCharm
7 7 """
8 8 from commons import common as com
9   -from commons.MySession import my
  9 +from commons.MySession import my,sy1
10 10 import requests
11 11  
12 12 class feedback_order_settlement():
... ... @@ -21,15 +21,15 @@ class feedback_order_settlement():
21 21 "Accept-Encoding": "gzip,deflate",
22 22 "Cookie": "UAP_accessToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJXRUIiLCJuYmYiOjE2Mjc4NjU1NzgsImRhdGEiOiJ7XCJjZWxscGhvbmVcIjpcIjE1NTI2MzY0NDU2XCIsXCJjcmVhdGVkXCI6MTYwODc5NTk0OTAwMCxcImRlcGFydG1lbnRJZFwiOjU2LFwiZW1haWxcIjpcInNoZW55YW5nQGRpbGlncnAuY29tXCIsXCJmaXJtQ29kZVwiOlwic3lcIixcImZpcm1JZFwiOjksXCJmaXJtTmFtZVwiOlwi5rKI6Ziz5Zyw5Yip5Yac5om55biC5Zy65a6i5oi355S15a2Q57uT566X5Lit5b-DXCIsXCJpZFwiOjI1MSxcImxhc3RMb2dpblRpbWVcIjoxNjI3ODY1NTc3OTg5LFwibWV0YWRhdGFcIjp7fSxcIm1vZGlmaWVkXCI6MTYyNjE2MzAwNDAwMCxcInBhc3N3b3JkXCI6XCIxODk2NUVCNzJDOTJBNTQ5RERcIixcInJlYWxOYW1lXCI6XCLmsojpmLNcIixcInNlcmlhbE51bWJlclwiOlwiMDAwXCIsXCJzdGF0ZVwiOjEsXCJzeXN0ZW1UeXBlXCI6MSxcInVzZXJOYW1lXCI6XCI0NDQ0NDRcIixcInVzZXJUeXBlXCI6MX0iLCJpc3MiOiJVQVBfQVVUSDAiLCJleHAiOjE2Mjc4NjczNzgsImlhdCI6MTYyNzg2NTU3OCwianRpIjoiMTBhOTY2ZmEtYTAzYS00YTFiLTliYmMtNDIzMTRhN2Y2ZGVmIn0.LnIkAnxYqN75lotTXyIyNn6Mu7qvu4eOqeEhuXcoeWGpJ5_vTYDbOt7VY9EbvN_dNVdaW1LD0Fp0hDWNLu9mUi-RytYo-WgvSM-BBuzCnp9r9CschtW0lmzQhYtvp1GF5FC0FMw1LQB0WVeQjKW8hShwQgD8DqYh_1EWXDgJ3VE; UAP_refreshToken=0e205e78-a656-4a85-a2ba-7226ce898ae5; UAP_firmId=9"
23 23 }
24   - body = "id=25&cardNo=888810057654&settleAmount=2&ids=12034&feedbackCustomerId=25&feedbackCustomerName=%E9%AA%8C%E8%AF%81%E5%91%98%E5%B7%A5%E6%8E%A8%E9%80%81%E5%88%B0CRM&billIds=3621&settledAmounts=2"
  24 + body = "id=25&cardNo=888810057654&settleAmount=2&ids=12034&feedbackCustomerId=25&feedbackCustomerName=验证员工推送到CRM&billIds=3621&settledAmounts=2"
25 25  
26 26 def __init__(self):
27 27 self.url = feedback_order_settlement.url.replace("http://test.",com.get_global_config("global_data", "environment", "en") )
28 28 self.header = feedback_order_settlement.header
29 29 self.body = feedback_order_settlement.body
30 30  
31   -# fe=feedback_order_settlement()
32   -# print(fe.body)
33   -# re=my.post(url=fe.url,headers=fe.header,data=fe.body)
34   -# print(re.json())
35   -# print(re.headers)
36 31 \ No newline at end of file
  32 +fe=feedback_order_settlement()
  33 +print(fe.body)
  34 +re=sy1.post(url=fe.url,headers=fe.header,data=fe.body.encode('utf-8'))
  35 +print(re.json())
  36 +print(re.headers)
37 37 \ No newline at end of file
... ...
commons/api/feedback_order_settlement_query.py 0 → 100644
  1 +# -*- coding: utf-8 -*-
  2 +"""
  3 +@Time : 2021/8/3 15:58
  4 +@Auth : wlm
  5 +@File :feedback_order_settlement_query.py
  6 +@IDE :PyCharm
  7 +"""
  8 +from commons import common as com
  9 +from commons.MySession import my,sy1
  10 +
  11 +class feedback_order_settlement_query():
  12 + url = "http://test.jmsf.diligrp.com:8385/FeedbackOrderController/list.action"
  13 +
  14 + header = {
  15 + "Host": "test.jmsf.diligrp.com:8385", "Connection": "keep-alive", "Content-Length": "496",
  16 + "Accept": "application/json,text/javascript,*/*;q=0.01", "Origin": "http://test.jmsf.diligrp.com:8385",
  17 + "X-Requested-With": "XMLHttpRequest",
  18 + "User-Agent": "Mozilla/5.0(WindowsNT6.2;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/84.0.4147.105Safari/537.36",
  19 + "Content-Type": "application/x-www-form-urlencoded", "Accept-Language": "zh-CN,zh;q=0.9",
  20 + "Referer": "http://test.jmsf.diligrp.com:8385/FeedbackOrderController/list", "Accept-Encoding": "gzip,deflate"
  21 + }
  22 +
  23 + # body = '''page=1&order=desc&
  24 + # metadata[payTime]={"provider":"datetimeProvider","index":10,"field":"payTime"}
  25 + # &metadata[feebackAmount]={"provider":"moneyProvider","index":20,"field":"feebackAmount"}
  26 + # &metadata[unsettledAmount]={"provider":"moneyProvider","index":40,"field":"unsettledAmount"}
  27 + # &feedbackCustomerId=25&tagId=yjsp&queryType=2&keyword=苹果
  28 + # &payTimeStart=2021-07-22 00:00:00&payTimeEnd=2021-08-03 23:59:59'''
  29 +
  30 + body = '''page=1&order=desc&
  31 + metadata[payTime]={"provider":"datetimeProvider","index":10,"field":"payTime"}
  32 + &metadata[feebackAmount]={"provider":"moneyProvider","index":20,"field":"feebackAmount"}
  33 + &metadata[unsettledAmount]={"provider":"moneyProvider","index":40,"field":"unsettledAmount"}
  34 + &feedbackCustomerId=25&queryType=2&
  35 + &payTimeStart=2021-07-22 00:00:00&payTimeEnd=2021-08-03 23:59:59'''
  36 +
  37 + def __init__(self):
  38 + self.url = feedback_order_settlement_query.url.replace("http://test.", com.get_global_config("global_data", "environment", "en"))
  39 + self.header = feedback_order_settlement_query.header
  40 + self.body = feedback_order_settlement_query.body
  41 + print(self.body)
  42 +
  43 +fosq = feedback_order_settlement_query
  44 +print(fosq.body)
  45 +re = sy1.post(url = fosq.url, data = fosq.body.encode('utf-8'),headers = fosq.header,proxies=my.myproxies)
  46 +print(re.text)
0 47 \ No newline at end of file
... ...
testcase/FeedbackCustomerController/fc_add.py
1 1 import unittest
2 2 import urllib3
3   -from commons import common as com
4   -from commons.MySession import my,sy1
  3 +from commons.MySession import sy1
5 4 from commons.api.fc_add import fc_add
6 5 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
7 6 from commons.Faker import random_data
... ... @@ -12,7 +11,8 @@ class test_fc_add(unittest.TestCase):
12 11 "新增返还人"
13 12 @classmethod
14 13 def setUpClass(cls):
15   - my.post(url=fc.url, headers=fc.header, data=fc.body.encode('utf-8'))
  14 + # my.post(url=fc.url, headers=fc.header, data=fc.body.encode('utf-8'))
  15 + pass
16 16  
17 17 def test_fc_add_01(self):
18 18 body = fc.body.replace("888810054630","888810054630").replace("你好",ra.name()).replace("relation\
... ...
testcase/FeedbackCustomerController/fc_edit.py
1 1 import unittest
2 2 import urllib3
3   -from commons import common as com
4 3 from commons.MySession import my,sy1
5 4 from commons.api.fc_edit import fc_edit
6 5 urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
... ... @@ -11,7 +10,8 @@ class test_fc_edit(unittest.TestCase):
11 10 "修改返还人"
12 11 @classmethod
13 12 def setUpClass(cls):
14   - my.post(url=fc.url, headers=fc.header, data=fc.body.encode('utf-8'))
  13 + # my.post(url=fc.url, headers=fc.header, data=fc.body.encode('utf-8'))
  14 + pass
15 15  
16 16 def test_fc_edit_01(self):
17 17  
... ...
testcase/FeedbackCustomerController/fc_view.py
1 1 import unittest
2 2 import urllib3
3 3 import commons.ConfigDB as db
4   -from commons import common as com
5 4 from commons.MySession import my,sy1
6 5 from commons.api.fc_view import fc_view
7 6 from commons.api.fc_add import fc_add
... ... @@ -14,8 +13,9 @@ class test_fc_view(unittest.TestCase):
14 13  
15 14 @classmethod
16 15 def setUpClass(cls):
17   - # 通过字段配置接口提前配置新增页的字段配置
18   - my.post(url = ad.url, headers = ad.header, data = ad.body.encode('utf-8'))
  16 + # # 通过字段配置接口提前配置新增页的字段配置
  17 + # my.post(url = ad.url, headers = ad.header, data = ad.body.encode('utf-8'))
  18 + pass
19 19  
20 20 def setUp(self):
21 21 # 准备数据
... ...
testcase/FeedbackCustomerController/feedback_customer_disable.py 0 → 100644
  1 +import unittest
  2 +import urllib3
  3 +from commons.MySession import sy1
  4 +from commons.api.feedback_customer_disable import feedback_customer_disable
  5 +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  6 +fcd = feedback_customer_disable()
  7 +import commons.ConfigDB as db
  8 +
  9 +class test_fc_add(unittest.TestCase):
  10 + "返还人禁用"
  11 + @classmethod
  12 + def setUpClass(cls):
  13 + pass
  14 +
  15 + def setUp(self):
  16 + self.id = db.mysql_selectOne("SELECT * FROM `dili_jmsf`.`feedback_customer` WHERE `status` = '1' ORDER BY `id` DESC LIMIT 1")[0]
  17 + print("查询出返还人id", self.id)
  18 +
  19 + def test_fc_add_01(self):
  20 + url = fcd.url.replace("44", str(self.id))
  21 + re = sy1.post(url=url, headers=fcd.header)
  22 + print(re.headers)
  23 + print(re.json())
  24 + self.assertTrue("操作成功" in str(re.json()))
  25 +
  26 + @classmethod
  27 + def tearDownClass(cls):
  28 + pass
  29 +
  30 +if __name__ == '__main__':
  31 + unittest.main()
... ...
testcase/FeedbackCustomerController/feedback_customer_enable.py 0 → 100644
  1 +import unittest
  2 +import urllib3
  3 +from commons.MySession import sy1
  4 +from commons.api.feedback_customer_enable import feedback_customer_enable
  5 +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  6 +fce = feedback_customer_enable()
  7 +import commons.ConfigDB as db
  8 +
  9 +class test_fc_add(unittest.TestCase):
  10 + "返还人启用"
  11 + @classmethod
  12 + def setUpClass(cls):
  13 + pass
  14 +
  15 + def setUp(self):
  16 + self.id = db.mysql_selectOne("SELECT * FROM `dili_jmsf`.`feedback_customer` WHERE `status` = '2' ORDER BY `id` DESC LIMIT 1")[0]
  17 + print(self.id)
  18 + def test_fc_add_01(self):
  19 +
  20 + url = fce.url.replace("49",str(self.id))
  21 + re = sy1.post(url = url, headers = fce.header)
  22 + print(fce.url)
  23 + print(re.headers)
  24 + print(re.json())
  25 + self.assertTrue("操作成功" in str(re.json()))
  26 + @classmethod
  27 + def tearDownClass(cls):
  28 + pass
  29 +
  30 +if __name__ == '__main__':
  31 + unittest.main()
... ...
testcase/FeedbackCustomerController/feedback_customer_query.py 0 → 100644
  1 +import unittest
  2 +import urllib3
  3 +from commons.MySession import my,sy1
  4 +from commons.api.feedback_customer_query import feedback_customer_query
  5 +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  6 +fcq = feedback_customer_query()
  7 +
  8 +class test_feedback_customer_query(unittest.TestCase):
  9 + "返还人列表查询"
  10 + @classmethod
  11 + def setUpClass(cls):
  12 + pass
  13 +
  14 + def test_feedback_customer_query_01(self):
  15 + print(fcq.url)
  16 + body = fcq.body.replace("史芳", "孟莹").replace("2021-07-02 00:00:00","\
  17 + 2021-08-02 00:00:00").replace("2021-08-03 23:59:59", "2021-08-08 23:59:59")
  18 +
  19 + re = sy1.post(url = fcq.url, data = body.encode('utf-8'),headers = fcq.header,proxies=my.myproxies)
  20 + print(re.headers)
  21 + print(re.json())
  22 + self.assertTrue("孟莹" in str(re.json()))
  23 +
  24 + @classmethod
  25 + def tearDownClass(cls):
  26 + pass
  27 +
  28 +
  29 +if __name__ == '__main__':
  30 + unittest.main()
... ...
testcase/FeedbackOrderController/feedback_order_settlement.py 0 → 100644
  1 +import unittest
  2 +
  3 +
  4 +class MyTestCase(unittest.TestCase):
  5 + def test_something(self):
  6 + self.assertEqual(True, False)
  7 +
  8 +
  9 +if __name__ == '__main__':
  10 + unittest.main()
... ...
testcase/FeedbackOrderController/feedback_order_settlement_query.py 0 → 100644
  1 +import unittest
  2 +import urllib3
  3 +from commons.MySession import my,sy1
  4 +from commons.api.feedback_order_settlement_query import feedback_order_settlement_query
  5 +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  6 +fosq = feedback_order_settlement_query()
  7 +
  8 +class test_feedback_order_settlement_query(unittest.TestCase):
  9 + "结账管理列表查询"
  10 + @classmethod
  11 + def setUpClass(cls):
  12 + pass
  13 +
  14 + def test_feedback_order_settlement_query_01(self):
  15 + print(fosq.url)
  16 + body = fosq.body.replace("25", "16").replace("2021-07-22 00:00:00", "\
  17 + 2021-07-03 00:00:00").replace("2021-08-03 23:59:59", "2021-08-03 23:59:59")
  18 +
  19 +
  20 + re = sy1.post(url = fosq.url, data = body,headers = fosq.header,proxies=my.myproxies)
  21 + print(re.headers)
  22 + print(re.json())
  23 + self.assertTrue("新爱心园婚介所的总公司" in str(re.json()))
  24 +
  25 + @classmethod
  26 + def tearDownClass(cls):
  27 + pass
  28 +
  29 +
  30 +if __name__ == '__main__':
  31 + unittest.main()
... ...