Fix broken usage of translator api key constant in tests

Also adds an after function to one of these tests, to reset it.