fixed test for missing api key
fixing use of API key from env