# Path: rocketchat_API/APIExceptions/RocketExceptions.py
# class RocketMissingParamException(Exception):
#     pass


import pytest
from rocketchat_API.APIExceptions.RocketExceptions import RocketMissingParamException
    assert rooms_clean_history.get("success")


def test_rooms_favorite(logged_rocket):
    rooms_favorite = logged_rocket.rooms_favorite(
        room_id="GENERAL", favorite=True
    ).json()
    assert rooms_favorite.get("success")

    rooms_favorite = logged_rocket.rooms_favorite(
        room_name="general", favorite=True
    ).json()
    assert rooms_favorite.get("success")

    rooms_favorite = logged_rocket.rooms_favorite(
        room_id="unexisting_channel", favorite=True
    ).json()
    assert not rooms_favorite.get("success")

    with pytest.raises(RocketMissingParamException):
        logged_rocket.rooms_favorite()


def test_rooms_info(logged_rocket):
    rooms_infoby_name = logged_rocket.rooms_info(room_name="general").json()
    assert rooms_infoby_name.get("success")
    assert rooms_infoby_name.get("room").get("_id") == "GENERAL"
    rooms_info_by_id = logged_rocket.rooms_info(room_id="GENERAL").json()
    assert rooms_info_by_id.get("success")
    assert rooms_info_by_id.get("room").get("_id") == "GENERAL"

# Path: rocketchat_API/APIExceptions/RocketExceptions.py
# class RocketMissingParamException(Exception):
#     pass


# Path: tests/test_rooms.py
import pytest
from rocketchat_API.APIExceptions.RocketExceptions import RocketMissingParamException

    assert rooms_clean_history.get("success")


def test_rooms_favorite(logged_rocket):
    rooms_favorite = logged_rocket.rooms_favorite(
        room_id="GENERAL", favorite=True
    ).json()
    assert rooms_favorite.get("success")

    rooms_favorite = logged_rocket.rooms_favorite(
        room_name="general", favorite=True
    ).json()
    assert rooms_favorite.get("success")

    rooms_favorite = logged_rocket.rooms_favorite(
        room_id="unexisting_channel", favorite=True
    ).json()
    assert not rooms_favorite.get("success")

    with pytest.raises(RocketMissingParamException):
        logged_rocket.rooms_favorite()


def test_rooms_info(logged_rocket):
    rooms_infoby_name = logged_rocket.rooms_info(room_name="general").json()
    assert rooms_infoby_name.get("success")
    assert rooms_infoby_name.get("room").get("_id") == "GENERAL"
    rooms_info_by_id = logged_rocket.rooms_info(room_id="GENERAL").json()
    assert rooms_info_by_id.get("success")
    assert rooms_info_by_id.get("room").get("_id") == "GENERAL"

    with pytest.raises(RocketMissingParamException):