File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,7 +121,8 @@ def test_user_access_list_stream_matches_paginated_list(self):
121121 )
122122 self .assertEqual (response_stream .status_code , 200 )
123123 self .assertEqual (response_stream .headers ["Content-Type" ], "application/x-ndjson" )
124- rows = [json .loads (line ) for line in response_stream .content .decode ().splitlines () if line .strip ()]
124+ text = b"" .join (response_stream .streaming_content ).decode ()
125+ rows = [json .loads (line ) for line in text .splitlines () if line .strip ()]
125126 self .assertEqual (rows , response_list .json ()["results" ])
126127
127128 def test_entity_access_list_stream_matches_paginated_list (self ):
@@ -136,5 +137,6 @@ def test_entity_access_list_stream_matches_paginated_list(self):
136137 )
137138 self .assertEqual (response_stream .status_code , 200 )
138139 self .assertEqual (response_stream .headers ["Content-Type" ], "application/x-ndjson" )
139- rows = [json .loads (line ) for line in response_stream .content .decode ().splitlines () if line .strip ()]
140+ text = b"" .join (response_stream .streaming_content ).decode ()
141+ rows = [json .loads (line ) for line in text .splitlines () if line .strip ()]
140142 self .assertEqual (rows , response_list .json ()["results" ])
Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ def test_get_entities_stream_matches_paginated_list(self):
5757 response_stream = self .client .get (reverse ("entity_list_stream" ), ** self .headers_admin )
5858 self .assertEqual (response_stream .status_code , 200 )
5959 self .assertEqual (response_stream .headers ["Content-Type" ], "application/x-ndjson" )
60- rows = [json .loads (line ) for line in response_stream .content .decode ().splitlines () if line .strip ()]
60+ text = b"" .join (response_stream .streaming_content ).decode ()
61+ rows = [json .loads (line ) for line in text .splitlines () if line .strip ()]
6162 self .assertEqual (rows , response_list .json ()["results" ])
6263
6364
You can’t perform that action at this time.
0 commit comments