database: fix unit tests