add unit tests for new Python API

This commit is contained in:
Sarah Hoffmann
2022-12-07 19:47:46 +01:00
parent cf19036ce6
commit 9d31a67116
7 changed files with 230 additions and 6 deletions

View File

@@ -60,7 +60,7 @@ async def get_status(engine: AsyncEngine) -> StatusResult:
async with engine.begin() as conn:
status.data_updated = await _get_database_date(conn)
status.database_version = await _get_database_version(conn)
except asyncpg.PostgresError as err:
return StatusResult(700, str(err))
except asyncpg.PostgresError:
return StatusResult(700, 'No database')
return status