Skip to content

Commit

Permalink
fix UT
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelmsft committed Oct 25, 2022
1 parent b4f466d commit c3544a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/validated_config_db_connector_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,7 @@ def test_validated_delete_table_invalid_delete(self):

def test_create_gcu_patch(self):
expected_gcu_patch = jsonpatch.JsonPatch([{"op": "add", "path": "/PORTCHANNEL/PortChannel01", "value": "test"}])
created_gcu_patch = validated_config_db_connector.ValidatedConfigDBConnector.create_gcu_patch(ValidatedConfigDBConnector(ConfigDBConnector()), "add", "PORTCHANNEL", "PortChannel01", "test")
assert expected_gcu_patch == created_gcu_patch
with mock.patch('validated_config_db_connector.ConfigDBConnector.get_table', return_value=True):
with mock.patch('validated_config_db_connector.ConfigDBConnector.get_entry', return_value=True):
created_gcu_patch = validated_config_db_connector.ValidatedConfigDBConnector.create_gcu_patch(ValidatedConfigDBConnector(ConfigDBConnector()), "add", "PORTCHANNEL", "PortChannel01", "test")
assert expected_gcu_patch == created_gcu_patch

0 comments on commit c3544a2

Please sign in to comment.