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):
3838 class Index (View ):
3939 """Index docstring"""
4040
41- tags = ["tag1" , "tag2" ]
41+ tags = set ( ["tag1" , "tag2" ])
4242
4343 def get (self ):
4444 return "GET"
4545
4646 def post (self ):
4747 return "POST"
4848
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
6753
6854
6955def test_dict_to_apispec_operations_params (spec ):
You can’t perform that action at this time.
0 commit comments