@@ -57,8 +57,7 @@ def setUpClass(self):
57
57
58
58
print ('\n Setup complete.' )
59
59
60
- @pytest .mark .depends (name = 'case_creation' )
61
- def test_create_case (self ):
60
+ def test_01_create_case (self ):
62
61
63
62
# Offering info can be retrieved via /case-management/utilities/v1/offerings/technical
64
63
offering_payload_type_model = {}
@@ -92,7 +91,7 @@ def test_create_case(self):
92
91
assert subject == response .result ['short_description' ]
93
92
assert description == response .result ['description' ]
94
93
95
- def test_create_case_with_empty_offering (self ):
94
+ def test_02_create_case_with_empty_offering (self ):
96
95
97
96
type = 'technical'
98
97
subject = 'Python - Integration test'
@@ -109,7 +108,7 @@ def test_create_case_with_empty_offering(self):
109
108
)
110
109
assert e .value .code == 400
111
110
112
- def test_create_case_with_empty_subject_and_description (self ):
111
+ def test_03_create_case_with_empty_subject_and_description (self ):
113
112
114
113
# Offering info can be retrieved via /case-management/utilities/v1/offerings/technical
115
114
offering_payload_type_model = {}
@@ -139,8 +138,7 @@ def test_create_case_with_empty_subject_and_description(self):
139
138
)
140
139
assert e .value .code == 500
141
140
142
- @pytest .mark .depends (on = 'case_creation' )
143
- def test_get_cases (self ):
141
+ def test_04_get_cases (self ):
144
142
145
143
offset = 0
146
144
limit = 2
@@ -158,8 +156,7 @@ def test_get_cases(self):
158
156
assert response .status_code == 200
159
157
assert response .result ['total_count' ] > 0
160
158
161
- @pytest .mark .depends (on = 'case_creation' )
162
- def test_get_case (self ):
159
+ def test_05_get_case (self ):
163
160
164
161
fields = ['number' , 'short_description' ]
165
162
case_number = TestCaseManagementV1 .new_case_number
@@ -173,7 +170,7 @@ def test_get_case(self):
173
170
assert TestCaseManagementV1 .new_case_number == response .result ['number' ]
174
171
assert response .result ['short_description' ] != ''
175
172
176
- def test_get_case_with_invalid_field (self ):
173
+ def test_06_get_case_with_invalid_field (self ):
177
174
178
175
fields = ['number' , 'short_description' , 'invalid_field' ]
179
176
case_number = TestCaseManagementV1 .new_case_number
@@ -186,8 +183,7 @@ def test_get_case_with_invalid_field(self):
186
183
)
187
184
assert e .value .code == 400
188
185
189
- @pytest .mark .depends (on = 'case_creation' )
190
- def test_add_comment (self ):
186
+ def test_07_add_comment (self ):
191
187
192
188
case_number = TestCaseManagementV1 .new_case_number
193
189
comment = 'This is a test comment!'
@@ -201,7 +197,7 @@ def test_add_comment(self):
201
197
assert response .status_code == 200
202
198
assert comment == response .result ["value" ]
203
199
204
- def test_add_comment_to_nonexisting_case (self ):
200
+ def test_08_add_comment_to_nonexisting_case (self ):
205
201
206
202
case_number = 'fake-case-number'
207
203
comment = 'This is a test comment!'
@@ -214,8 +210,7 @@ def test_add_comment_to_nonexisting_case(self):
214
210
)
215
211
assert e .value .code == 404
216
212
217
- @pytest .mark .depends (on = 'case_creation' )
218
- def test_add_watch_list_member (self ):
213
+ def test_09_add_watch_list_member (self ):
219
214
220
215
# Users can be retrieved via the User Management API.
221
216
user_id_and_realm_model = {}
@@ -239,9 +234,7 @@ def test_add_watch_list_member(self):
239
234
if user ['user_id' ] == user_id_and_realm_model ['user_id' ]]
240
235
assert len (found_users ) == 1
241
236
242
- @pytest .mark .depends (on = 'case_creation' )
243
- @pytest .mark .depends (name = 'file_upload' )
244
- def test_file_upload (self ):
237
+ def test_10_file_upload (self ):
245
238
246
239
fileName = "test_file.txt"
247
240
@@ -262,9 +255,7 @@ def test_file_upload(self):
262
255
assert response .status_code == 200
263
256
assert response .result ['filename' ] == fileName
264
257
265
- @pytest .mark .depends (on = 'file_upload' )
266
- @pytest .mark .depends (name = 'file_download' )
267
- def test_download_file (self ):
258
+ def test_11_download_file (self ):
268
259
269
260
response = self .service .download_file (
270
261
TestCaseManagementV1 .new_case_number ,
@@ -275,8 +266,7 @@ def test_download_file(self):
275
266
assert response .status_code == 200
276
267
assert 'content-type' in response .headers
277
268
278
- @pytest .mark .depends (on = 'file_download' )
279
- def test_delete_file (self ):
269
+ def test_12_delete_file (self ):
280
270
281
271
response = self .service .delete_file (
282
272
TestCaseManagementV1 .new_case_number ,
@@ -288,9 +278,7 @@ def test_delete_file(self):
288
278
# Assert the file attachment list is empty
289
279
assert len (response .result ['attachments' ]) == 0
290
280
291
- @pytest .mark .depends (on = 'file_download' )
292
- @pytest .mark .depends (name = 'add_resource' )
293
- def test_add_resource (self ):
281
+ def test_13_add_resource (self ):
294
282
295
283
# Adding a resource requires a valid CRN (Cloud Resource Name)
296
284
# CRN's can be retrieved via the Search and Tagging API
@@ -310,8 +298,7 @@ def test_add_resource(self):
310
298
)
311
299
assert e .value .code == 500
312
300
313
- @pytest .mark .depends (on = 'add_resource' )
314
- def test_resolve_case (self ):
301
+ def test_14_resolve_case (self ):
315
302
316
303
status_payload = {}
317
304
status_payload ['action' ] = 'resolve'
0 commit comments