fixes check for predefined API_KEY and API_SECRET for tests