Skip to content
This repository was archived by the owner on Feb 14, 2025. It is now read-only.

Commit 4cd8874

Browse files
committed
fix create test
1 parent 4eac40d commit 4cd8874

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/unit/confidant/routes/credentials_test.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ def test_create_credential(mocker: MockerFixture, credential: Credential):
422422
return_value=(True, 123),
423423
)
424424
ret = app.test_client().post(
425-
'/v1/credentials/123',
425+
'/v1/credentials',
426426
headers={"Content-Type": 'application/json'},
427427
data=json.dumps({
428428
'name': 'me',
@@ -431,9 +431,9 @@ def test_create_credential(mocker: MockerFixture, credential: Credential):
431431
}),
432432
)
433433
json_data = json.loads(ret.data)
434+
assert ret.status_code == 409
434435
error_msg = 'Credential with the same key value pairs already exists.'
435436
error_msg += ' See id: 123'
436-
assert ret.status_code == 409
437437
assert error_msg == json_data['error']
438438

439439
# All good
@@ -591,9 +591,9 @@ def test_update_credential(mocker: MockerFixture, credential: Credential):
591591
}),
592592
)
593593
json_data = json.loads(ret.data)
594+
assert ret.status_code == 409
594595
error_msg = 'Credential with the same key value pairs already exists.'
595596
error_msg += ' See id: 123'
596-
assert ret.status_code == 409
597597
assert error_msg == json_data['error']
598598

599599
# All good

0 commit comments

Comments
 (0)