db: fixed some tests.
db: fixed api tests.