forked from loafle/openapi-generator-original
Add enum support for model property of python client
This commit is contained in:
25
samples/client/petstore/python/tests/test_order_model.py
Normal file
25
samples/client/petstore/python/tests/test_order_model.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# coding: utf-8
|
||||
|
||||
"""
|
||||
Run the tests.
|
||||
$ pip install nose (optional)
|
||||
$ cd swagger_client-python
|
||||
$ nosetests -v
|
||||
"""
|
||||
|
||||
import os
|
||||
import time
|
||||
import unittest
|
||||
|
||||
import swagger_client
|
||||
|
||||
|
||||
class OrderModelTests(unittest.TestCase):
|
||||
|
||||
def test_status(self):
|
||||
order = swagger_client.Order()
|
||||
order.status = "placed"
|
||||
self.assertEqual("placed", order.status)
|
||||
|
||||
with self.assertRaises(ValueError):
|
||||
order.status = "invalid"
|
||||
Reference in New Issue
Block a user