Base code for tests
APIError tests