def test_remove_failure(self, exists_mock, sudo_mock):
        exists_mock.return_value = False
        fabric.api.env.host = 'localhost'
        out = _AttributeString()
        out.succeeded = False
        sudo_mock.return_value = out
        self.assertRaisesRegexp(SystemExit,
                                '\\[localhost\\] Failed to remove catalog tpch.',
                                catalog.remove,
                                'tpch')