Skip to content

Commit

Permalink
fix create test
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandroroiz committed Apr 4, 2024
1 parent 4eac40d commit 4cd8874
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/unit/confidant/routes/credentials_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ def test_create_credential(mocker: MockerFixture, credential: Credential):
return_value=(True, 123),
)
ret = app.test_client().post(
'/v1/credentials/123',
'/v1/credentials',
headers={"Content-Type": 'application/json'},
data=json.dumps({
'name': 'me',
Expand All @@ -431,9 +431,9 @@ def test_create_credential(mocker: MockerFixture, credential: Credential):
}),
)
json_data = json.loads(ret.data)
assert ret.status_code == 409
error_msg = 'Credential with the same key value pairs already exists.'
error_msg += ' See id: 123'
assert ret.status_code == 409
assert error_msg == json_data['error']

# All good
Expand Down Expand Up @@ -591,9 +591,9 @@ def test_update_credential(mocker: MockerFixture, credential: Credential):
}),
)
json_data = json.loads(ret.data)
assert ret.status_code == 409
error_msg = 'Credential with the same key value pairs already exists.'
error_msg += ' See id: 123'
assert ret.status_code == 409
assert error_msg == json_data['error']

# All good
Expand Down

0 comments on commit 4cd8874

Please sign in to comment.