-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_run.py
59 lines (46 loc) · 2.34 KB
/
test_run.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import unittest
import smoke_test_assist
def test_create_order_no_pay(): ## Придумать как запихнуть параметры в тест-фикстуру (верю, что так можно)
params = {"price": 0, "status": 0, "client_order": False, "auth": True}
result = smoke_test_assist.create_order(params)
assert result.get("status_code") == 201
assert result["data"].get("price") == 0
"""
def test_create_order_pay(self):
params = {"price": 11, "status": 0, "client_order": False}
result = smoke_test_assist.create_order(params)
assert result.get("status_code") == 201
assert result["data"].get("price") > 0
def test_create_order_no_pay_book(self):
params = {"price": 0, "status": 1, "client_order": False}
result = smoke_test_assist.create_order(params)
assert result.get("status_code") == 201
assert result["data"].get("price") == 0
def test_create_order_pay_book(self):
params = {"price": 11, "status": 1, "client_order": False}
result = smoke_test_assist.create_order(params)
assert result.get("status_code") == 201
assert result["data"].get("price") > 0
def test_create_client_order_no_pay(self):
params = {"price": 0, "status": 0, "client_order": True}
result = smoke_test_assist.create_order(params)
assert result.get("status_code") == 201
assert result["data"].get("price") == 0
def test_create_client_order_pay(self):
params = {"price": 11, "status": 0, "client_order": True}
result = smoke_test_assist.create_order(params)
assert result.get("status_code") == 201
assert result["data"].get("price") > 0
def test_create_client_order_no_pay_book(self):
params = {"price": 0, "status": 1, "client_order": True}
result = smoke_test_assist.create_order(params)
assert result.get("status_code") == 201
assert result["data"].get("price") == 0
def test_create_client_order_pay_book(self):
params = {"price": 11, "status": 1, "client_order": True}
result = smoke_test_assist.create_order(params)
assert result.get("status_code") == 201
assert result["data"].get("price") == 11.0
"""
if __name__ == '__main__':
unittest.main()