From f29e49981574b88a041651b4c729fe36a765da99 Mon Sep 17 00:00:00 2001 From: isabelmsft Date: Tue, 1 Nov 2022 22:41:12 +0000 Subject: [PATCH] Revert "fix UT" This reverts commit 5899db9080cea50806454d5b7fbdd9c1d16ae0fe. --- tests/aaa_test.py | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/tests/aaa_test.py b/tests/aaa_test.py index e554937e1f..80f9baa301 100644 --- a/tests/aaa_test.py +++ b/tests/aaa_test.py @@ -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