forked from loafle/openapi-generator-original
* Adds lazy_import, removes python-exp java class renaming code, partial removal of getPythonClassName call sites Fixes PythonClientExperimentalTest.java Python-exp smaples regeneration Revers makefile Reverst pom.xml Fixes model imports in models.__init__ Updates docstring, omits lazy import in additional properties if we dont need it Improves additional_properties_type assignment if None Removes getPythonClassName Fixes python-exp tests * Removes unused makefiles
45 lines
1.0 KiB
Python
45 lines
1.0 KiB
Python
# coding: utf-8
|
|
|
|
"""
|
|
OpenAPI Petstore
|
|
|
|
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
|
|
|
|
The version of the OpenAPI document: 1.0.0
|
|
Generated by: https://openapi-generator.tech
|
|
"""
|
|
|
|
|
|
from __future__ import absolute_import
|
|
import sys
|
|
import unittest
|
|
|
|
import petstore_api
|
|
from petstore_api.model.player import Player
|
|
|
|
|
|
class TestPlayer(unittest.TestCase):
|
|
"""Player unit test stubs"""
|
|
|
|
def setUp(self):
|
|
pass
|
|
|
|
def tearDown(self):
|
|
pass
|
|
|
|
def testPlayer(self):
|
|
"""Test Player"""
|
|
# we can make a player without an enemy_player property
|
|
jane = Player(name="Jane")
|
|
# we can make a player with an enemy_player
|
|
sally = Player(name="Sally", enemy_player=jane)
|
|
# we can make a player with an inline enemy_player
|
|
jim = Player(
|
|
name="Jim",
|
|
enemy_player=Player(name="Sam")
|
|
)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|