mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Pass a 'sent' parameter to Mock().
This commit is contained in:
parent
71f7d353f0
commit
4713ef7f37
@ -6,7 +6,7 @@ from gunicorn.config import Config
|
||||
from gunicorn.glogging import Logger
|
||||
|
||||
|
||||
class Mock():
|
||||
class Mock(object):
|
||||
def __init__(self, **kwargs):
|
||||
for attr in kwargs:
|
||||
setattr(self, attr, kwargs[attr])
|
||||
@ -14,7 +14,8 @@ class Mock():
|
||||
|
||||
def test_atoms_defaults():
|
||||
response = Mock(status='200', response_length=1024,
|
||||
headers=(('Content-Type', 'application/json'), ))
|
||||
headers=(('Content-Type', 'application/json'),),
|
||||
sent=1024)
|
||||
request = Mock(headers=(('Accept', 'application/json'), ))
|
||||
environ = {'REQUEST_METHOD': 'GET', 'RAW_URI': 'http://my.uri',
|
||||
'SERVER_PROTOCOL': 'HTTP/1.1'}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user