modified api tests to reflect changes in db (or rather: to be a bit more db agnostic)