Closed michael-lazar closed 2 years ago
Hi, thanks for creating this awesome library!
I am glad you like it, and thanks for opening this issue.
I suspect this is a holdout bug from the python 2 -> 3 conversion
I believe you are right. Feel free to propose a PR with a small fix and a test if you like the idea.
Here is a version including your fix, many thanks!
Hi, thanks for creating this awesome library!
I've just started using mocket to test raw socket connections and uncovered some weirdness with
MocketEntry.request_cls
. The default behavior is to cast the request data as astr
, but this doesn't really make sense for python 3 because sockets use bytes. This results in the request data being mangled as a string. Here's an exampleI suspect this is a holdout bug from the python 2 -> 3 conversion, and not the intended behavior. For now I've fixed it for myself by subclassing the mocket entry.