Skip to content

Commit

Permalink
Revert "fix UT"
Browse files Browse the repository at this point in the history
This reverts commit 5899db9.
  • Loading branch information
isabelmsft committed Nov 1, 2022
1 parent 08ee911 commit f29e499
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions tests/aaa_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,17 +294,7 @@ def test_config_aaa_tacacs_delete_yang_validation(self):

result = runner.invoke(config.config.commands["tacacs"].commands["delete"], ["10.10.10.10"], obj=obj)
print(result.exit_code)
print(result.output)
assert result.exit_code != 0
assert "Invalid ip address. Error:" in result.output

@patch("validated_config_db_connector.device_info.is_yang_config_validation_enabled", mock.Mock(return_value=True))
@patch("config.validated_config_db_connector.ValidatedConfigDBConnector.validated_set_entry", mock.Mock(side_effect=ValueError))
@patch("config.main.ConfigDBConnector.get_entry", mock.Mock(return_value={}))
def test_config_aaa_tacacs_add_yang_validation(self):
config.ADHOC_VALIDATION = True
runner = CliRunner()
db = Db()
obj = {'db':db.cfgdb}

result = runner.invoke(config.config.commands["tacacs"].commands["add"], ["10.10.10.10"], obj=obj)
print(result.exit_code)
assert result.exit_code != 0

0 comments on commit f29e499

Please sign in to comment.