More test cases for the key_error