From 341cd8f81fc6e6cd60ab2ed63e36ee3c05a55f10 Mon Sep 17 00:00:00 2001 From: Alejandro Roiz Walss Date: Thu, 4 Apr 2024 13:28:03 -0600 Subject: [PATCH] fix precommit --- confidant/routes/credentials.py | 8 ++++---- tests/unit/confidant/routes/credentials_test.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/confidant/routes/credentials.py b/confidant/routes/credentials.py index a10c47b2..0f2b885d 100644 --- a/confidant/routes/credentials.py +++ b/confidant/routes/credentials.py @@ -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) @@ -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}) diff --git a/tests/unit/confidant/routes/credentials_test.py b/tests/unit/confidant/routes/credentials_test.py index bb1a8721..71a7081c 100644 --- a/tests/unit/confidant/routes/credentials_test.py +++ b/tests/unit/confidant/routes/credentials_test.py @@ -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'] @@ -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']