python-pydantic-v1.api_test.mustache Maven / Gradle / Ivy
# coding: utf-8
{{>partial_header}}
import unittest
from {{apiPackage}}.{{classFilename}} import {{classname}} # noqa: E501
class {{#operations}}Test{{classname}}(unittest.{{#asyncio}}IsolatedAsyncio{{/asyncio}}TestCase):
"""{{classname}} unit test stubs"""
{{#asyncio}}
async def asyncSetUp(self) -> None:
self.api = {{classname}}()
async def asyncTearDown(self) -> None:
pass
{{/asyncio}}
{{^asyncio}}
def setUp(self) -> None:
self.api = {{classname}}()
def tearDown(self) -> None:
pass
{{/asyncio}}
{{#operation}}
{{#asyncio}}
async def test_{{operationId}}(self) -> None:
{{/asyncio}}
{{^asyncio}}
def test_{{operationId}}(self) -> None:
{{/asyncio}}
"""Test case for {{{operationId}}}
{{#summary}}
{{{.}}} # noqa: E501
{{/summary}}
"""
pass
{{/operation}}
{{/operations}}
if __name__ == '__main__':
unittest.main()
© 2015 - 2024 Weber Informatics LLC | Privacy Policy