-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
165 lines (127 loc) · 5.54 KB
/
test.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
import uuid
import unittest
class ServiceRequestTestCase(unittest.TestCase):
@unittest.skip("skipping")
def test_contacts_service(self):
from ts.services.auth_service import login_user_request
from test.test_contacts_service import test_all
print("\n\nTest contacts_service")
request_id = str(uuid.uuid4())
admin_bearer, admin_user_id = login_user_request(
username="admin", password="222222", request_id=request_id
)
test_all(request_id, admin_bearer, self.assertIsInstance, self.assertEqual)
@unittest.skip("skipping")
def test_auth_service(self):
from test.test_auth_service import test_all
print("\n\nTest auth_service")
test_all(self.assertIsInstance)
@unittest.skip("skipping")
def test_station_service(self):
from ts.services.auth_service import login_user_request
from test.test_station_service import test_all
print("\n\nTest station_service")
request_id = str(uuid.uuid4())
admin_bearer, admin_user_id = login_user_request(
username="admin", password="222222", request_id=request_id
)
test_all(
admin_bearer,
admin_user_id,
self.assertIsInstance,
self.assertEqual,
)
@unittest.skip("skipping")
def test_admin_route_service(self):
from ts.services.auth_service import login_user_request
from test.test_admin_route_service import test_all
print("\n\nTest admin_route_service")
request_id = str(uuid.uuid4())
admin_bearer, admin_user_id = login_user_request(
username="admin", password="222222", request_id=request_id
)
test_all(
admin_bearer,
admin_user_id,
request_id,
self.assertIsInstance,
self.assertEqual,
)
@unittest.skip("skipping")
def test_admin_travel_service(self):
from ts.services.auth_service import login_user_request
from test.test_admin_travel_service import test_all
print("\n\nTest admin_travel_service")
request_id = str(uuid.uuid4())
admin_bearer, admin_user_id = login_user_request(
username="admin", password="222222", request_id=request_id
)
test_all(admin_bearer, request_id, self.assertIsInstance, self.assertEqual)
@unittest.skip("skipping")
def test_train_service(self):
from ts.services.auth_service import login_user_request
from test.test_train_service import test_all
print("\n\nTest train_service")
request_id = str(uuid.uuid4())
admin_bearer, admin_user_id = login_user_request(
username="admin", password="222222", request_id=request_id
)
test_all(admin_bearer, request_id, self.assertIsInstance, self.assertEqual)
@unittest.skip("skipping")
def test_admin_basic_service(self):
from ts.services.auth_service import login_user_request
from test.test_admin_basic_service import test_all
print("\n\nTest admin_basic_service")
request_id = str(uuid.uuid4())
admin_bearer, admin_user_id = login_user_request(
username="admin", password="222222", request_id=request_id
)
test_all(admin_bearer, request_id, self.assertIsInstance, self.assertEqual)
@unittest.skip("skipping")
def test_food_service(self):
from ts.services.auth_service import login_user_request
from test.test_food_service import test_all
print("\n\nTest food_service")
request_id = str(uuid.uuid4())
bearer, user_id = login_user_request(
username="fdse_microservice", password="111111", request_id=request_id
)
test_all(bearer, request_id, self.assertIsInstance, self.assertEqual)
@unittest.skip("skipping")
def test_food_map_service(self):
from test.test_food_map_service import test_all
print("\n\nTest food_map_service")
request_id = str(uuid.uuid4())
test_all(request_id, self.assertIsInstance, self.assertEqual)
@unittest.skip("skipping")
def test_preserve_service(self):
from ts.services.auth_service import login_user_request
from test.test_preserve_service import test_all
print("\n\nTest preserve_service")
request_id = str(uuid.uuid4())
bearer, user_id = login_user_request(
username="fdse_microservice", password="111111", request_id=request_id
)
test_all(request_id, bearer, user_id, self.assertIsInstance, self.assertEqual)
@unittest.skip("skipping")
def test_admin_user_service(self):
from ts.services.auth_service import login_user_request
from test.test_admin_user_service import test_all
print("\n\nTest admin_user_service")
request_id = str(uuid.uuid4())
bearer, user_id = login_user_request(
username="admin", password="222222", request_id=request_id
)
test_all(request_id, bearer, self.assertIsInstance, self.assertEqual)
@unittest.skip("skipping")
def test_visit_page(self):
from ts.services.auth_service import login_user_request
from test.test_visit_page import test_all
print("\n\nTest visit_page")
request_id = str(uuid.uuid4())
bearer, user_id = login_user_request(
username="fdse_microservice", password="111111", request_id=request_id
)
test_all(request_id, bearer, self.assertIsInstance, self.assertEqual)
if __name__ == "__main__":
unittest.main()