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 10ca008 commit 4eac40d
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions tests/unit/confidant/routes/credentials_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,14 +417,6 @@ def test_create_credential(mocker: MockerFixture, credential: Credential):
assert 'Name already exists' in json_data['error']

# Credential key value pair is duplicate
mocker.patch(
('confidant.routes.credentials.servicemanager'
'.pair_key_conflicts_for_services'),
return_value={},
)
mock_save = mocker.patch('confidant.routes.credentials.Credential.save')
mocker.patch('confidant.routes.credentials.graphite.send_event')
mocker.patch('confidant.routes.credentials.webhook.send_event')
mocker.patch(
'confidant.services.credentialmanager.is_key_value_pair_duplicate',
return_value=(True, 123),
Expand All @@ -433,8 +425,9 @@ def test_create_credential(mocker: MockerFixture, credential: Credential):
'/v1/credentials/123',
headers={"Content-Type": 'application/json'},
data=json.dumps({
'credential_pairs': {'foo': 'baz'},
'enabled': True,
'name': 'me',
'documentation': 'doc',
'credential_pairs': {'key': 'value'},
}),
)
json_data = json.loads(ret.data)
Expand Down

0 comments on commit 4eac40d

Please sign in to comment.