Skip to content

Commit

Permalink
fix precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandroroiz committed Apr 4, 2024
1 parent 88e5248 commit 341cd8f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions confidant/routes/credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,8 +633,8 @@ def create_credential():
credential_pairs
)
if is_duplicate:
msg = 'Credential with the same key value pairs already exists. '
msg += 'See id: {0}'''.format(duplicate_id)
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

credential_pairs = json.dumps(credential_pairs)
Expand Down Expand Up @@ -886,8 +886,8 @@ def update_credential(id):
credential_pairs
)
if is_duplicate:
msg = 'Credential with the same key value pairs already exists. '
msg += 'See id: {0}'.format(duplicate_id)
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

data_key = keymanager.create_datakey(encryption_context={'id': id})
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. '
error_msg += '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. '
error_msg += '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 341cd8f

Please sign in to comment.