Skip to content

Commit a248a0d

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

File tree

5 files changed

+19
-31
lines changed

5 files changed

+19
-31
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ matrix:
1212
&& openssl aes-256-cbc -K $encrypted_acd9ca9788e3_key -iv $encrypted_acd9ca9788e3_iv -in resource_manager.env.enc -out resource_manager.env -d
1313
&& openssl aes-256-cbc -K $encrypted_dac53b985913_key -iv $encrypted_dac53b985913_iv -in case_management.env.enc -out case_management.env -d
1414
|| true
15+
- cat case_management.env
1516
- python: 3.6
1617
- python: 3.7
1718
- python: 3.8

case_management.env.enc

0 Bytes
Binary file not shown.

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

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ jproperties
22
requests>=2.0,<3.0
33
python_dateutil>=2.5.3
44
websocket-client==0.48.0
5-
ibm_cloud_sdk_core>=2.0.0,<3.0.0
5+
ibm_cloud_sdk_core>=2.0.1,<3.0.0

test/integration/test_case_management_v1.py

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ def setUpClass(self):
5252

5353
self.config = read_external_sources(CaseManagementV1.DEFAULT_SERVICE_NAME)
5454
assert self.config is not None
55-
self.test_api_key = self.config.get('APIKEY')
56-
assert self.test_api_key is not None
55+
assert self.config['APIKEY'] is not None
56+
assert self.config['AUTHTYPE'] is not None
57+
assert self.config['AUTH_URL'] is not None
5758

5859
print('\nSetup complete.')
5960

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

6363
# Offering info can be retrieved via /case-management/utilities/v1/offerings/technical
6464
offering_payload_type_model = {}
@@ -92,7 +92,7 @@ def test_create_case(self):
9292
assert subject == response.result['short_description']
9393
assert description == response.result['description']
9494

95-
def test_create_case_with_empty_offering(self):
95+
def test_02_create_case_with_empty_offering(self):
9696

9797
type = 'technical'
9898
subject = 'Python - Integration test'
@@ -109,7 +109,7 @@ def test_create_case_with_empty_offering(self):
109109
)
110110
assert e.value.code == 400
111111

112-
def test_create_case_with_empty_subject_and_description(self):
112+
def test_03_create_case_with_empty_subject_and_description(self):
113113

114114
# Offering info can be retrieved via /case-management/utilities/v1/offerings/technical
115115
offering_payload_type_model = {}
@@ -139,8 +139,7 @@ def test_create_case_with_empty_subject_and_description(self):
139139
)
140140
assert e.value.code == 500
141141

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

145144
offset = 0
146145
limit = 2
@@ -158,8 +157,7 @@ def test_get_cases(self):
158157
assert response.status_code == 200
159158
assert response.result['total_count'] > 0
160159

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

164162
fields = ['number', 'short_description']
165163
case_number = TestCaseManagementV1.new_case_number
@@ -173,7 +171,7 @@ def test_get_case(self):
173171
assert TestCaseManagementV1.new_case_number == response.result['number']
174172
assert response.result['short_description'] != ''
175173

176-
def test_get_case_with_invalid_field(self):
174+
def test_06_get_case_with_invalid_field(self):
177175

178176
fields = ['number', 'short_description', 'invalid_field']
179177
case_number = TestCaseManagementV1.new_case_number
@@ -186,8 +184,7 @@ def test_get_case_with_invalid_field(self):
186184
)
187185
assert e.value.code == 400
188186

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

192189
case_number = TestCaseManagementV1.new_case_number
193190
comment = 'This is a test comment!'
@@ -201,7 +198,7 @@ def test_add_comment(self):
201198
assert response.status_code == 200
202199
assert comment == response.result["value"]
203200

204-
def test_add_comment_to_nonexisting_case(self):
201+
def test_08_add_comment_to_nonexisting_case(self):
205202

206203
case_number = 'fake-case-number'
207204
comment = 'This is a test comment!'
@@ -214,8 +211,7 @@ def test_add_comment_to_nonexisting_case(self):
214211
)
215212
assert e.value.code == 404
216213

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

220216
# Users can be retrieved via the User Management API.
221217
user_id_and_realm_model = {}
@@ -239,9 +235,7 @@ def test_add_watch_list_member(self):
239235
if user['user_id'] == user_id_and_realm_model['user_id']]
240236
assert len(found_users) == 1
241237

242-
@pytest.mark.depends(on='case_creation')
243-
@pytest.mark.depends(name='file_upload')
244-
def test_file_upload(self):
238+
def test_10_file_upload(self):
245239

246240
fileName = "test_file.txt"
247241

@@ -262,9 +256,7 @@ def test_file_upload(self):
262256
assert response.status_code == 200
263257
assert response.result['filename'] == fileName
264258

265-
@pytest.mark.depends(on='file_upload')
266-
@pytest.mark.depends(name='file_download')
267-
def test_download_file(self):
259+
def test_11_download_file(self):
268260

269261
response = self.service.download_file(
270262
TestCaseManagementV1.new_case_number,
@@ -275,8 +267,7 @@ def test_download_file(self):
275267
assert response.status_code == 200
276268
assert 'content-type' in response.headers
277269

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

281272
response = self.service.delete_file(
282273
TestCaseManagementV1.new_case_number,
@@ -288,9 +279,7 @@ def test_delete_file(self):
288279
# Assert the file attachment list is empty
289280
assert len(response.result['attachments']) == 0
290281

291-
@pytest.mark.depends(on='file_download')
292-
@pytest.mark.depends(name='add_resource')
293-
def test_add_resource(self):
282+
def test_13_add_resource(self):
294283

295284
# Adding a resource requires a valid CRN (Cloud Resource Name)
296285
# CRN's can be retrieved via the Search and Tagging API
@@ -310,8 +299,7 @@ def test_add_resource(self):
310299
)
311300
assert e.value.code == 500
312301

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

316304
status_payload = {}
317305
status_payload['action'] = 'resolve'

0 commit comments

Comments
 (0)