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


import uuid
import pytest
from rocketchat_API.APIExceptions.RocketExceptions import RocketMissingParamException

def test_channels_members(logged_rocket):
    channels_members = logged_rocket.channels_members(room_id="GENERAL").json()
    assert channels_members.get("success")
    channels_members = logged_rocket.channels_members(channel="general").json()
    assert channels_members.get("success")

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


def test_channels_roles(logged_rocket):
    channels_roles = logged_rocket.channels_roles(room_id="GENERAL").json()
    assert channels_roles.get("success")
    assert channels_roles.get("roles") is not None
    channels_roles = logged_rocket.channels_roles(room_name="general").json()
    assert channels_roles.get("success")
    assert channels_roles.get("roles") is not None

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


def test_channels_files(logged_rocket):
    channels_files = logged_rocket.channels_files(room_id="GENERAL").json()
    assert channels_files.get("success")

    channels_files = logged_rocket.channels_files(room_name="general").json()
    assert channels_files.get("success")


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


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


def test_channels_members(logged_rocket):
    channels_members = logged_rocket.channels_members(room_id="GENERAL").json()
    assert channels_members.get("success")
    channels_members = logged_rocket.channels_members(channel="general").json()
    assert channels_members.get("success")

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


def test_channels_roles(logged_rocket):
    channels_roles = logged_rocket.channels_roles(room_id="GENERAL").json()
    assert channels_roles.get("success")
    assert channels_roles.get("roles") is not None
    channels_roles = logged_rocket.channels_roles(room_name="general").json()
    assert channels_roles.get("success")
    assert channels_roles.get("roles") is not None

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


def test_channels_files(logged_rocket):
    channels_files = logged_rocket.channels_files(room_id="GENERAL").json()
    assert channels_files.get("success")

    channels_files = logged_rocket.channels_files(room_name="general").json()
    assert channels_files.get("success")


    with pytest.raises(RocketMissingParamException):