File tree Expand file tree Collapse file tree 1 file changed +5
-19
lines changed Expand file tree Collapse file tree 1 file changed +5
-19
lines changed Original file line number Diff line number Diff line change @@ -38,32 +38,18 @@ def test_view_to_apispec_tags(spec):
38
38
class Index (View ):
39
39
"""Index docstring"""
40
40
41
- tags = ["tag1" , "tag2" ]
41
+ tags = set ( ["tag1" , "tag2" ])
42
42
43
43
def get (self ):
44
44
return "GET"
45
45
46
46
def post (self ):
47
47
return "POST"
48
48
49
- assert apispec .view_to_apispec_operations (Index , spec ) == {
50
- "get" : {
51
- "description" : "Index docstring" ,
52
- "summary" : "Index docstring" ,
53
- "tags" : ["tag1" , "tag2" ],
54
- "responses" : {
55
- 200 : {"description" : "OK" , "content" : {"application/json" : {}}}
56
- },
57
- },
58
- "post" : {
59
- "description" : "Index docstring" ,
60
- "summary" : "Index docstring" ,
61
- "tags" : ["tag1" , "tag2" ],
62
- "responses" : {
63
- 200 : {"description" : "OK" , "content" : {"application/json" : {}}}
64
- },
65
- },
66
- }
49
+ spec_ops = apispec .view_to_apispec_operations (Index , spec )
50
+
51
+ assert set (spec_ops ["get" ]["tags" ]) == Index .tags
52
+ assert set (spec_ops ["post" ]["tags" ]) == Index .tags
67
53
68
54
69
55
def test_dict_to_apispec_operations_params (spec ):
You can’t perform that action at this time.
0 commit comments