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


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

    with pytest.raises(RocketMissingParamException):
        logged_rocket.chat_post_message(text="text")

    msg_id = chat_post_message.get("message").get("_id")
    chat_get_message = logged_rocket.chat_get_message(msg_id=msg_id).json()
    assert chat_get_message.get("message").get("_id") == msg_id

    chat_update = logged_rocket.chat_update(
        room_id=chat_post_message.get("channel"),
        msg_id=chat_post_message.get("message").get("_id"),
        text="hello again",
    ).json()

    assert chat_update.get("message").get("msg") == "hello again"
    assert chat_update.get("success")

    chat_delete = logged_rocket.chat_delete(
        room_id=chat_post_message.get("channel"),
        msg_id=chat_post_message.get("message").get("_id"),
    ).json()
    assert chat_delete.get("success")


def test_chat_send_notext_message(logged_rocket):
    chat_send_message = logged_rocket.chat_send_message({"rid": "GENERAL"}).json()
    assert chat_send_message.get("message").get("rid") == "GENERAL"
    assert chat_send_message.get("message").get("msg") == ""
    assert chat_send_message.get("success")

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


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

    assert chat_post_message.get("success")

    with pytest.raises(RocketMissingParamException):
        logged_rocket.chat_post_message(text="text")

    msg_id = chat_post_message.get("message").get("_id")
    chat_get_message = logged_rocket.chat_get_message(msg_id=msg_id).json()
    assert chat_get_message.get("message").get("_id") == msg_id

    chat_update = logged_rocket.chat_update(
        room_id=chat_post_message.get("channel"),
        msg_id=chat_post_message.get("message").get("_id"),
        text="hello again",
    ).json()

    assert chat_update.get("message").get("msg") == "hello again"
    assert chat_update.get("success")

    chat_delete = logged_rocket.chat_delete(
        room_id=chat_post_message.get("channel"),
        msg_id=chat_post_message.get("message").get("_id"),
    ).json()
    assert chat_delete.get("success")


def test_chat_send_notext_message(logged_rocket):
    chat_send_message = logged_rocket.chat_send_message({"rid": "GENERAL"}).json()
    assert chat_send_message.get("message").get("rid") == "GENERAL"
    assert chat_send_message.get("message").get("msg") == ""
    assert chat_send_message.get("success")

    with pytest.raises(RocketMissingParamException):