Commit 6b74a506a6ae3274c52af43a5617fcc77b2ac60e
1 parent
cc0c95c5
更新进门称重的方法
Showing
7 changed files
with
6 additions
and
104 deletions
commons/api/feedback_customer_disable.py
@@ -24,7 +24,9 @@ class feedback_customer_disable(): | @@ -24,7 +24,9 @@ class feedback_customer_disable(): | ||
24 | def __init__(self): | 24 | def __init__(self): |
25 | self.url = feedback_customer_disable.url.replace("http://test.", com.get_global_config("global_data", "environment", "en")) | 25 | self.url = feedback_customer_disable.url.replace("http://test.", com.get_global_config("global_data", "environment", "en")) |
26 | self.header = feedback_customer_disable.header | 26 | self.header = feedback_customer_disable.header |
27 | -# | 27 | + |
28 | + | ||
29 | + | ||
28 | # fcd = feedback_customer_disable() | 30 | # fcd = feedback_customer_disable() |
29 | # re = my.post(url=fcd.url, headers=fcd.header) | 31 | # re = my.post(url=fcd.url, headers=fcd.header) |
30 | # print(re.json()) | 32 | # print(re.json()) |
31 | \ No newline at end of file | 33 | \ No newline at end of file |
commons/api/feedback_customer_enable.py
@@ -6,7 +6,6 @@ | @@ -6,7 +6,6 @@ | ||
6 | @IDE :PyCharm | 6 | @IDE :PyCharm |
7 | """ | 7 | """ |
8 | from commons import common as com | 8 | from commons import common as com |
9 | -from commons.MySession import my | ||
10 | 9 | ||
11 | class feedback_customer_enable(): | 10 | class feedback_customer_enable(): |
12 | url = "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/enable.action?id=49" | 11 | url = "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/enable.action?id=49" |
@@ -18,8 +17,8 @@ class feedback_customer_enable(): | @@ -18,8 +17,8 @@ class feedback_customer_enable(): | ||
18 | "User-Agent": "Mozilla/5.0(WindowsNT6.2;WOW64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/84.0.4147.105Safari/537.36", | 17 | "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", | 18 | "Accept-Language": "zh-CN,zh;q=0.9", |
20 | "Referer": "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/list", | 19 | "Referer": "http://test.jmsf.diligrp.com:8385/FeedbackCustomerController/list", |
21 | - "Accept-Encoding": "gzip,deflate" | ||
22 | - } | 20 | + "Accept-Encoding": "gzip,deflate"} |
21 | + | ||
23 | def __init__(self): | 22 | def __init__(self): |
24 | self.url = feedback_customer_enable.url.replace("http://test.", com.get_global_config("global_data", "environment", "en")) | 23 | self.url = feedback_customer_enable.url.replace("http://test.", com.get_global_config("global_data", "environment", "en")) |
25 | self.header = feedback_customer_enable.header | 24 | self.header = feedback_customer_enable.header |
commons/api/feedback_customer_query.py
@@ -5,7 +5,6 @@ | @@ -5,7 +5,6 @@ | ||
5 | @File :test_feedback_customer_query.py | 5 | @File :test_feedback_customer_query.py |
6 | @IDE :PyCharm | 6 | @IDE :PyCharm |
7 | """ | 7 | """ |
8 | -import kwargs as kwargs | ||
9 | 8 | ||
10 | from commons import common as com | 9 | from commons import common as com |
11 | from commons.MySession import my,sy1 | 10 | from commons.MySession import my,sy1 |
testcase/FeedbackCustomerController/__init__.py
testcase/FeedbackCustomerController/test_feedback_customer_disable.py deleted
100644 → 0
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_feedback_customer_disable(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_feedback_customer_disable_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/test_feedback_customer_enable.py deleted
100644 → 0
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_feedback_customer_enable(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_feedback_customer_enable_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/test_feedback_customer_query.py deleted
100644 → 0
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) | ||
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() |