Browse Source

ref: exhaust streaming response to prevent ResourceWarning (#38915)

I couldn't actually reproduce this one locally due to chromedriver
shenanigans -- but in theory this is the same as the other ones I fixed
like #35429
anthony sottile 2 years ago
parent
commit
c36b3146e6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tests/chartcuterie/test_chart_renderer.py

+ 1 - 1
tests/chartcuterie/test_chart_renderer.py

@@ -20,6 +20,6 @@ class TestChartRenderer(AcceptanceTestCase):
 
             # Ensure our chart images actually look like pngs
             assert resp.status_code == 200
-            assert next(resp.streaming_content)[:4] == b"\x89PNG"
+            assert b"".join(resp.streaming_content)[:4] == b"\x89PNG"
 
         self.browser.snapshot("chart renderer debug view via chartcuterie")