move more tests down to the api module