mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 15:47:58 +00:00
fix error message for non-existing database
This commit is contained in:
@@ -54,7 +54,7 @@ def test_status_database_not_found(monkeypatch):
|
||||
result = api.status()
|
||||
|
||||
assert result.status == 700
|
||||
assert result.message == 'No database'
|
||||
assert result.message == 'Database connection failed'
|
||||
assert result.software_version == version_str()
|
||||
assert result.database_version is None
|
||||
assert result.data_updated is None
|
||||
|
||||
@@ -38,7 +38,11 @@ class TestStatusResultFormat:
|
||||
|
||||
|
||||
def test_format_text(self):
|
||||
assert self.formatter.format(StatusResult(0, 'message here'), 'text') == 'message here'
|
||||
assert self.formatter.format(StatusResult(0, 'message here'), 'text') == 'OK'
|
||||
|
||||
|
||||
def test_format_text(self):
|
||||
assert self.formatter.format(StatusResult(500, 'message here'), 'text') == 'ERROR: message here'
|
||||
|
||||
|
||||
def test_format_json_minimal(self):
|
||||
|
||||
Reference in New Issue
Block a user