]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/python/db/test_utils.py
also enable flake for tests in github actions
[nominatim.git] / test / python / db / test_utils.py
index 7c46846dbdd4fb0ba5c2fc2ae436f7df76005411..2bc7d95934277859593b3fc7cfeb60366749f3e6 100644 (file)
@@ -2,18 +2,17 @@
 #
 # This file is part of Nominatim. (https://nominatim.org)
 #
-# Copyright (C) 2024 by the Nominatim developer community.
+# Copyright (C) 2025 by the Nominatim developer community.
 # For a full list of authors see the git log.
 """
 Tests for DB utility functions in db.utils
 """
-import json
-
 import pytest
 
 import nominatim_db.db.utils as db_utils
 from nominatim_db.errors import UsageError
 
+
 def test_execute_file_success(dsn, temp_db_cursor, tmp_path):
     tmpfile = tmp_path / 'test.sql'
     tmpfile.write_text('CREATE TABLE test (id INT);\nINSERT INTO test VALUES(56);')
@@ -22,6 +21,7 @@ def test_execute_file_success(dsn, temp_db_cursor, tmp_path):
 
     assert temp_db_cursor.row_set('SELECT * FROM test') == {(56, )}
 
+
 def test_execute_file_bad_file(dsn, tmp_path):
     with pytest.raises(FileNotFoundError):
         db_utils.execute_file(dsn, tmp_path / 'test2.sql')