From 8cb37715538c63c25ae0f94a417666ef18d72251 Mon Sep 17 00:00:00 2001 From: Nikhil Badyal Date: Wed, 10 Jan 2024 13:32:36 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Use=20variable=20instead=20of=20?= =?UTF-8?q?hard=20coding=20password?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- esxport/click_opt/click_custom.py | 1 - test/click/cli_test.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/esxport/click_opt/click_custom.py b/esxport/click_opt/click_custom.py index 3bfe360..f0fad84 100644 --- a/esxport/click_opt/click_custom.py +++ b/esxport/click_opt/click_custom.py @@ -53,7 +53,6 @@ def convert(self: Self, value: Any, param: Parameter | None, ctx: Context | None """Convert input to json.""" try: return json.loads(value) # type: ignore[no-any-return] - except json.JSONDecodeError as exc: self.fail(invalid_query_format.format(value=value, exc=exc), param, ctx) diff --git a/test/click/cli_test.py b/test/click/cli_test.py index 7cfb0da..eafbf79 100644 --- a/test/click/cli_test.py +++ b/test/click/cli_test.py @@ -56,7 +56,7 @@ def test_mandatory(self: Self, cli_runner: CliRunner, esxport_obj_with_data: EsX result = cli_runner.invoke( cli, ["-q", args["q"], "-o", args["o"], "-i", args["i"]], - input="password\n", + input=random_pass, catch_exceptions=False, ) assert result.exit_code == 0