added some checking of the api key on the tests