test_req_rs_gxs_channels_create_channel.py 1.97 KB
Newer Older
Joan Pascual Sana's avatar
Joan Pascual Sana committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# coding: utf-8

"""
    RetroShare OpenApi wrapper

    RetroShare OpenApi wrapper generated using Doxygen documentation  # noqa: E501

    The version of the OpenAPI document: 0.0.1
    Generated by: https://openapi-generator.tech
"""


from __future__ import absolute_import

import unittest

import openapi_client
from openapi_client.models.req_rs_gxs_channels_create_channel import ReqRsGxsChannelsCreateChannel  # noqa: E501
from openapi_client.rest import ApiException
20 21 22
from test import API_INSTANCE
from openapi_client.models.rs_gxs_channel_group import RsGxsChannelGroup
from openapi_client.models.rs_group_meta_data import RsGroupMetaData
Joan Pascual Sana's avatar
Joan Pascual Sana committed
23 24 25 26 27 28 29 30 31 32 33 34 35

class TestReqRsGxsChannelsCreateChannel(unittest.TestCase):
    """ReqRsGxsChannelsCreateChannel unit test stubs"""

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def testReqRsGxsChannelsCreateChannel(self):
        """Test ReqRsGxsChannelsCreateChannel"""
        # FIXME: construct object with mandatory attributes with example values
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
        api_instance = API_INSTANCE

        groupMetada = RsGroupMetaData(m_group_name="Just another test channel2", m_group_flags=4, m_sign_flags=520)
        channel = RsGxsChannelGroup(m_meta=groupMetada, m_description="Test it!")
        # req_rs_gxs_channels_create_channel = {
        #     "channel": channel}  # ReqRsGxsChannelsCreateChannel | channel: ( RsGxsChannelGroup)Channel data (name, description...)   (optional)

        model = openapi_client.models.req_rs_gxs_channels_create_channel.ReqRsGxsChannelsCreateChannel(channel= channel)  # noqa: E501

        try:
            # Deprecated{ substituted by createChannelV2 }
            api_response = api_instance.rs_gxs_channels_create_channel(
                req_rs_gxs_channels_create_channel=model)
            print(api_response)
        except ApiException as e:
            print("Exception when calling DefaultApi->rs_gxs_channels_create_channel: %s\n" % e)

Joan Pascual Sana's avatar
Joan Pascual Sana committed
53 54 55 56 57
        pass


if __name__ == '__main__':
    unittest.main()