From ad6ac7b95a843917a3e50e4268a909f4a169594a Mon Sep 17 00:00:00 2001 From: antarcticrainforest Date: Tue, 18 Feb 2025 13:42:42 +0100 Subject: [PATCH] Increase test coverage. --- freva-rest/src/freva_rest/cli.py | 2 +- tests/test_cli.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/freva-rest/src/freva_rest/cli.py b/freva-rest/src/freva_rest/cli.py index 9fed748..c4c8f9a 100644 --- a/freva-rest/src/freva_rest/cli.py +++ b/freva-rest/src/freva_rest/cli.py @@ -160,7 +160,7 @@ def get_cert_file( def cli(argv: Optional[List[str]] = None) -> None: """Start the freva rest API.""" cfg = ServerConfig() - parser = create_arg_parser(cfg.__fields__, ["api-services"]) + parser = create_arg_parser(cfg.model_fields, ["api-services"]) parser.add_argument( "--dev", action="store_true", help="Enable development mode" ) diff --git a/tests/test_cli.py b/tests/test_cli.py index ee03cb6..a4530fd 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -133,6 +133,7 @@ def test_rest_cli(mocker: MockerFixture) -> None: workers=8, env_file=str(Path(temp_dir) / "foo.txt"), ) + cli(["-V"]) def test_auth(