File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ class PandasJSONRenderer(PandasBaseRenderer):
9898
9999 def get_pandas_kwargs (self , data ):
100100 return {
101- 'orient' : 'index ' ,
101+ 'orient' : 'records ' ,
102102 'date_format' : 'iso' ,
103103 }
104104
Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ def test_view_json(self):
2626 response = self .client .get ("/timeseries.json" )
2727 self .assertEqual (response .accepted_media_type , "application/json" )
2828 data = json .loads (response .content .decode ('utf-8' ))
29- self .assertEqual (len (data . keys () ), 5 )
30- self .assertEqual (data ["1" ]["value" ], 0.5 )
29+ self .assertEqual (len (data ), 5 )
30+ self .assertEqual (data [0 ]["value" ], 0.5 )
3131
3232 def test_viewset (self ):
3333 response = self .client .get ("/router/timeseries/.csv" )
You can’t perform that action at this time.
0 commit comments