def METHOD_NAME(etcd_client_mock, instance):
    """
    Test if it delete a key from etcd
    """
    with patch.dict(etcd_mod.__utils__, {"etcd_util.get_conn": etcd_client_mock}):
        instance.rm.return_value = False
        assert not etcd_mod.rm_("dir")
        instance.rm.assert_called_with("dir", recurse=False)
        instance.rm.return_value = True
        assert etcd_mod.rm_("dir", recurse=True)
        instance.rm.assert_called_with("dir", recurse=True)
        instance.rm.side_effect = Exception
        pytest.raises(Exception, etcd_mod.rm_, "err")