Skip to content

Commit 0559d8a

Browse files
committed
fix: remove pytest-depends from project
1 parent 250756c commit 0559d8a

File tree

2 files changed

+14
-28
lines changed

2 files changed

+14
-28
lines changed

requirements-dev.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ python_dotenv>=0.1.5
55
pylint>=1.4.4
66
tox>=2.9.1
77
pytest-rerunfailures>=3.1
8-
pytest-depends>=1.0.1
98

109
# code coverage
1110
coverage<5

test/integration/test_case_management_v1.py

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ def setUpClass(self):
5757

5858
print('\nSetup complete.')
5959

60-
@pytest.mark.depends(name='case_creation')
61-
def test_create_case(self):
60+
def test_01_create_case(self):
6261

6362
# Offering info can be retrieved via /case-management/utilities/v1/offerings/technical
6463
offering_payload_type_model = {}
@@ -92,7 +91,7 @@ def test_create_case(self):
9291
assert subject == response.result['short_description']
9392
assert description == response.result['description']
9493

95-
def test_create_case_with_empty_offering(self):
94+
def test_02_create_case_with_empty_offering(self):
9695

9796
type = 'technical'
9897
subject = 'Python - Integration test'
@@ -109,7 +108,7 @@ def test_create_case_with_empty_offering(self):
109108
)
110109
assert e.value.code == 400
111110

112-
def test_create_case_with_empty_subject_and_description(self):
111+
def test_03_create_case_with_empty_subject_and_description(self):
113112

114113
# Offering info can be retrieved via /case-management/utilities/v1/offerings/technical
115114
offering_payload_type_model = {}
@@ -139,8 +138,7 @@ def test_create_case_with_empty_subject_and_description(self):
139138
)
140139
assert e.value.code == 500
141140

142-
@pytest.mark.depends(on='case_creation')
143-
def test_get_cases(self):
141+
def test_04_get_cases(self):
144142

145143
offset = 0
146144
limit = 2
@@ -158,8 +156,7 @@ def test_get_cases(self):
158156
assert response.status_code == 200
159157
assert response.result['total_count'] > 0
160158

161-
@pytest.mark.depends(on='case_creation')
162-
def test_get_case(self):
159+
def test_05_get_case(self):
163160

164161
fields = ['number', 'short_description']
165162
case_number = TestCaseManagementV1.new_case_number
@@ -173,7 +170,7 @@ def test_get_case(self):
173170
assert TestCaseManagementV1.new_case_number == response.result['number']
174171
assert response.result['short_description'] != ''
175172

176-
def test_get_case_with_invalid_field(self):
173+
def test_06_get_case_with_invalid_field(self):
177174

178175
fields = ['number', 'short_description', 'invalid_field']
179176
case_number = TestCaseManagementV1.new_case_number
@@ -186,8 +183,7 @@ def test_get_case_with_invalid_field(self):
186183
)
187184
assert e.value.code == 400
188185

189-
@pytest.mark.depends(on='case_creation')
190-
def test_add_comment(self):
186+
def test_07_add_comment(self):
191187

192188
case_number = TestCaseManagementV1.new_case_number
193189
comment = 'This is a test comment!'
@@ -201,7 +197,7 @@ def test_add_comment(self):
201197
assert response.status_code == 200
202198
assert comment == response.result["value"]
203199

204-
def test_add_comment_to_nonexisting_case(self):
200+
def test_08_add_comment_to_nonexisting_case(self):
205201

206202
case_number = 'fake-case-number'
207203
comment = 'This is a test comment!'
@@ -214,8 +210,7 @@ def test_add_comment_to_nonexisting_case(self):
214210
)
215211
assert e.value.code == 404
216212

217-
@pytest.mark.depends(on='case_creation')
218-
def test_add_watch_list_member(self):
213+
def test_09_add_watch_list_member(self):
219214

220215
# Users can be retrieved via the User Management API.
221216
user_id_and_realm_model = {}
@@ -239,9 +234,7 @@ def test_add_watch_list_member(self):
239234
if user['user_id'] == user_id_and_realm_model['user_id']]
240235
assert len(found_users) == 1
241236

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):
245238

246239
fileName = "test_file.txt"
247240

@@ -262,9 +255,7 @@ def test_file_upload(self):
262255
assert response.status_code == 200
263256
assert response.result['filename'] == fileName
264257

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):
268259

269260
response = self.service.download_file(
270261
TestCaseManagementV1.new_case_number,
@@ -275,8 +266,7 @@ def test_download_file(self):
275266
assert response.status_code == 200
276267
assert 'content-type' in response.headers
277268

278-
@pytest.mark.depends(on='file_download')
279-
def test_delete_file(self):
269+
def test_12_delete_file(self):
280270

281271
response = self.service.delete_file(
282272
TestCaseManagementV1.new_case_number,
@@ -288,9 +278,7 @@ def test_delete_file(self):
288278
# Assert the file attachment list is empty
289279
assert len(response.result['attachments']) == 0
290280

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):
294282

295283
# Adding a resource requires a valid CRN (Cloud Resource Name)
296284
# CRN's can be retrieved via the Search and Tagging API
@@ -310,8 +298,7 @@ def test_add_resource(self):
310298
)
311299
assert e.value.code == 500
312300

313-
@pytest.mark.depends(on='add_resource')
314-
def test_resolve_case(self):
301+
def test_14_resolve_case(self):
315302

316303
status_payload = {}
317304
status_payload['action'] = 'resolve'

0 commit comments

Comments
 (0)