mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
tests: Fix send_bytes for testing requests
This commit is contained in:
parent
60efb1041e
commit
ccfb29871c
@ -78,8 +78,11 @@ class request(object):
|
|||||||
yield lines
|
yield lines
|
||||||
|
|
||||||
def send_bytes(self):
|
def send_bytes(self):
|
||||||
for d in str(self.data.decode("latin1")):
|
for d in self.data:
|
||||||
yield bytes(d.encode("latin1"))
|
if six.PY3:
|
||||||
|
yield bytes([d])
|
||||||
|
else:
|
||||||
|
yield d
|
||||||
|
|
||||||
def send_random(self):
|
def send_random(self):
|
||||||
maxs = round(len(self.data) / 10)
|
maxs = round(len(self.data) / 10)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user