Do not test for error message in KeyError