@patch('prestoadmin.connector.sudo')
    @patch('prestoadmin.connector.os.path.exists')
    @patch('prestoadmin.connector.os.remove')
    def test_remove(self, local_rm_mock, exists_mock, sudo_mock):
        script = ('if [ -f /etc/presto/catalog/tpch.properties ] ; '
                  'then rm /etc/presto/catalog/tpch.properties ; '
                  'else echo "Could not remove connector \'tpch\'. '
                  'No such file \'/etc/presto/catalog/tpch.properties\'"; fi')
        exists_mock.return_value = True
        fabric.api.env.host = 'localhost'
        connector.remove('tpch')
        sudo_mock.assert_called_with(script)
        local_rm_mock.assert_called_with(constants.CONNECTORS_DIR %
                                         '/tpch.properties')
dataset/ETHPy150Open prestodb/presto-admin/tests/unit/test_connector.py/TestConnector.test_remove/operator `+` -> `%`