Skip to content

Commit

Permalink
Merge pull request #178 from gordonarogers/master
Browse files Browse the repository at this point in the history
Deepcopy in _request_mock should handle ValueError alongside TypeError
  • Loading branch information
pnuckowski authored Dec 16, 2020
2 parents d09592f + 8e81d3a commit 93cde66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aioresponses/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ async def _request_mock(self, orig_self: ClientSession,
self.requests.setdefault(key, [])
try:
kwargs_copy = copy.deepcopy(kwargs)
except TypeError:
except (TypeError, ValueError):
# Handle the fact that some values cannot be deep copied
kwargs_copy = kwargs
self.requests[key].append(RequestCall(args, kwargs_copy))
Expand Down

0 comments on commit 93cde66

Please sign in to comment.