You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 9, 2021. It is now read-only.
Tests for python client, comprising support for additional_properties and arrays.
There are ugly workarounds for when there are discriminators, since the python client generator does not fully handle them.
Cool indentation of test files.
Copy file name to clipboardexpand all lines: samples/client/petstore/python/test/test_animal.py
+20-5
Original file line number
Diff line number
Diff line change
@@ -5,20 +5,20 @@
5
5
6
6
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
Copy file name to clipboardexpand all lines: samples/client/petstore/python/test/test_cat.py
+18-5
Original file line number
Diff line number
Diff line change
@@ -5,20 +5,20 @@
5
5
6
6
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
7
7
8
-
OpenAPI spec version: 1.0.0
8
+
The version of the OpenAPI document: 1.0.0
9
9
Generated by: https://openapi-generator.tech
10
10
"""
11
11
12
12
13
13
from __future__ importabsolute_import
14
14
15
15
importunittest
16
+
importdatetime
16
17
17
18
importpetstore_api
18
19
frompetstore_api.models.catimportCat# noqa: E501
19
20
frompetstore_api.restimportApiException
20
21
21
-
22
22
classTestCat(unittest.TestCase):
23
23
"""Cat unit test stubs"""
24
24
@@ -28,11 +28,24 @@ def setUp(self):
28
28
deftearDown(self):
29
29
pass
30
30
31
+
defmake_instance(self, include_optional):
32
+
"""Test Cat
33
+
include_option is a boolean, when False only required
34
+
params are included, when True both required and
35
+
optional params are included """
36
+
# model = petstore_api.models.cat.Cat() # noqa: E501
37
+
ifinclude_optional :
38
+
returnCat(
39
+
declawed=True
40
+
)
41
+
else :
42
+
returnCat(
43
+
)
44
+
31
45
deftestCat(self):
32
46
"""Test Cat"""
33
-
# FIXME: construct object with mandatory attributes with example values
34
-
# model = petstore_api.models.cat.Cat() # noqa: E501
Copy file name to clipboardexpand all lines: samples/client/petstore/python/test/test_category.py
+20-5
Original file line number
Diff line number
Diff line change
@@ -5,20 +5,20 @@
5
5
6
6
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
0 commit comments