Skip to content

Commit

Permalink
Fix test issue caused by change in Requests library
Browse files Browse the repository at this point in the history
  • Loading branch information
MaybeNetwork committed Jul 16, 2021
1 parent 6d2dcaf commit 4de8233
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/integration/models/reddit/test_subreddit.py
Expand Up @@ -513,6 +513,7 @@ def patch_request(url, *args, **kwargs):
"""Patch requests to return mock data on specific url."""
if "https://reddit-uploaded-media.s3-accelerate.amazonaws.com" in url:
response = requests.Response()
response.encoding = "utf-8"
response._content = mock_data.encode("utf-8")
response.status_code = 400
return response
Expand Down

0 comments on commit 4de8233

Please sign in to comment.