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


import uuid
import pytest
from rocketchat_API.APIExceptions.RocketExceptions import RocketMissingParamException
    ).json()
    # should fail because this is no more a group
    assert not groups_set_type.get("success")


def test_groups_set_custom_fields(
    logged_rocket,
    test_group_id,
    test_group_name,
):
    field_name = str(uuid.uuid1())
    field_value = str(uuid.uuid1())
    custom_fields = {field_name: field_value}

    groups_set_custom_fields = logged_rocket.groups_set_custom_fields(
        custom_fields, room_id=test_group_id
    ).json()
    assert groups_set_custom_fields.get("success")
    assert (
        groups_set_custom_fields.get("group").get("customFields") == custom_fields
    ), "Custom fields do not match"

    groups_set_custom_fields = logged_rocket.groups_set_custom_fields(
        custom_fields, room_name=test_group_name
    ).json()
    assert groups_set_custom_fields.get("success")
    assert (
        groups_set_custom_fields.get("group").get("customFields") == custom_fields
    ), "Custom fields do not match"


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


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

    ).json()
    # should fail because this is no more a group
    assert not groups_set_type.get("success")


def test_groups_set_custom_fields(
    logged_rocket,
    test_group_id,
    test_group_name,
):
    field_name = str(uuid.uuid1())
    field_value = str(uuid.uuid1())
    custom_fields = {field_name: field_value}

    groups_set_custom_fields = logged_rocket.groups_set_custom_fields(
        custom_fields, room_id=test_group_id
    ).json()
    assert groups_set_custom_fields.get("success")
    assert (
        groups_set_custom_fields.get("group").get("customFields") == custom_fields
    ), "Custom fields do not match"

    groups_set_custom_fields = logged_rocket.groups_set_custom_fields(
        custom_fields, room_name=test_group_name
    ).json()
    assert groups_set_custom_fields.get("success")
    assert (
        groups_set_custom_fields.get("group").get("customFields") == custom_fields
    ), "Custom fields do not match"


    with pytest.raises(RocketMissingParamException):