def METHOD_NAME(self, mock_method):
    self.obj.ansible_pos = ('foo.yml', 1, 1)
    mock_method.return_value = ('this is line 1\n', '')
    e = AnsibleError(self.message, self.obj)
    self.assertEqual(
        e.message,
        ("This is the error message\n\nThe error appears to be in 'foo.yml': line 1, column 1, but may\nbe elsewhere in the file depending on the "
         "exact syntax problem.\n\nThe offending line appears to be:\n\n\nthis is line 1\n^ here\n")
    )