]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/python/cli/test_cmd_admin.py
Correct some typos
[nominatim.git] / test / python / cli / test_cmd_admin.py
index 20e5be00f9257feb72fb4998850d9f0710d8a038..cc80c19aac3735f5250224a87ef4b64c926fceef 100644 (file)
@@ -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,9 +36,14 @@ 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') == 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')
+
+    assert cli_call('admin', '--clean-deleted') == 1
+
 class TestCliAdminWithDb:
 
     @pytest.fixture(autouse=True)