API tests: upgraded database, fixed broken tests