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

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandroroiz committed Apr 4, 2024
1 parent 642bb71 commit 88e5248
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion confidant/routes/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ def update_credential(id):
credential_pairs
)
if is_duplicate:
msg = 'Credential with the same key value pairs already exists.'
msg = 'Credential with the same key value pairs already exists. '
msg += 'See id: {0}'.format(duplicate_id)
return jsonify({'error': msg, 'reference': duplicate_id}), 409

Expand Down
8 changes: 4 additions & 4 deletions tests/unit/confidant/routes/credentials_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,8 @@ def test_create_credential(mocker: MockerFixture, credential: Credential):
}),
)
json_data = json.loads(ret.data)
error_msg = '''Credential with the same key value pairs already exists.
See id: 123'''
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']

Expand Down Expand Up @@ -598,8 +598,8 @@ def test_update_credential(mocker: MockerFixture, credential: Credential):
}),
)
json_data = json.loads(ret.data)
error_msg = '''Credential with the same key value pairs already exists.
See id: 123'''
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']

Expand Down

0 comments on commit 88e5248

Please sign in to comment.