fix unit test for api key auth