Skip to content

tests: Use binary-safe .read() method from aiohttp

Neill Whillans requested to merge neill/fix_browser_tests into master

Before raising this MR, consider whether the following are required, and complete if so:

  • Unit tests
  • Metrics
  • Documentation update(s)

If not required, please explain in brief why not.

Description

This request aims to replace the use of the aiohttp .text() method, which returns a str and is then encoded using the .encode() method, with the binary-safe .read() method, which directly returns bytes.

Changes proposed in this merge request:

  • Changes to test_browser_backend.py

Validation

N/A

Issues addressed

This fixes an issue of two failing, browser unit tests when using a version of aiohttp >=3.8, and will allow the use of a more up to date version of aiohttp.

Merge request reports