X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/9ec26c60ff1c9b5b259ecb7ef16ad0bacbc3174b..b0067a0345c2ab7793614925d6150141ef5f18f0:/test/python/cli/test_cmd_admin.py?ds=sidebyside diff --git a/test/python/cli/test_cmd_admin.py b/test/python/cli/test_cmd_admin.py index 0fe6e327..cc80c19a 100644 --- a/test/python/cli/test_cmd_admin.py +++ b/test/python/cli/test_cmd_admin.py @@ -8,7 +8,7 @@ Test for the command line interface wrapper admin subcommand. These tests just check that the various command line parameters route to the -correct functionionality. They use a lot of monkeypatching to avoid executing +correct functionality. They use a lot of monkeypatching to avoid executing the actual functions. """ import pytest @@ -36,14 +36,13 @@ def test_admin_migrate(cli_call, mock_func_factory): def test_admin_clean_deleted_relations(cli_call, mock_func_factory): mock = mock_func_factory(nominatim.tools.admin, 'clean_deleted_relations') - assert cli_call('admin', '--clean-deleted', '--age', '1 month') == 0 + assert cli_call('admin', '--clean-deleted', '1 month') == 0 assert mock.called == 1 def test_admin_clean_deleted_relations_no_age(cli_call, mock_func_factory): mock = mock_func_factory(nominatim.tools.admin, 'clean_deleted_relations') - with pytest.raises(SystemExit): - cli_call('admin', '--clean-deleted') + assert cli_call('admin', '--clean-deleted') == 1 class TestCliAdminWithDb: