# coding: utf-8

"""
    Organizze API

    Specification for the Organizze API described in [https://github.com/organizze/api-doc](https://github.com/organizze/api-doc)

    The version of the OpenAPI document: 1.0.0
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import unittest

from organizze_api.models.tag import Tag

class TestTag(unittest.TestCase):
    """Tag unit test stubs"""

    def setUp(self):
        pass

    def tearDown(self):
        pass

    def make_instance(self, include_optional) -> Tag:
        """Test Tag
            include_optional is a boolean, when False only required
            params are included, when True both required and
            optional params are included """
        if include_optional:
            return Tag(
                name = 'expenses'
            )
        else:
            return Tag()

    def testTag(self):
        """Test Tag"""
        self.make_instance(include_optional=False)
        self.make_instance(include_optional=True)

    def testTagWithName(self):
        """Test Tag creation with name"""
        tag = Tag(name="expenses")
        self.assertEqual(tag.name, "expenses")

    def testTagFromDict(self):
        """Test Tag deserialization from dict (API response format)"""
        tag_dict = {"name": "expenses"}
        tag = Tag.from_dict(tag_dict)
        self.assertIsNotNone(tag)
        self.assertEqual(tag.name, "expenses")

    def testTagToDict(self):
        """Test Tag serialization to dict"""
        tag = Tag(name="expenses")
        tag_dict = tag.to_dict()
        self.assertEqual(tag_dict, {"name": "expenses"})

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