diff options
| author | Chris McDonough <chrism@agendaless.com> | 2008-11-09 02:02:26 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2008-11-09 02:02:26 +0000 |
| commit | 516729ac8976a6e9ab3c43cef7b754ec6a7518a3 (patch) | |
| tree | d2526a216843b82d6387f3c6952f3372244feaa0 /repoze/bfg/testing.py | |
| parent | a9a8a2dcfa3381ee9da3550f84dcadd55825e1d4 (diff) | |
| download | pyramid-516729ac8976a6e9ab3c43cef7b754ec6a7518a3.tar.gz pyramid-516729ac8976a6e9ab3c43cef7b754ec6a7518a3.tar.bz2 pyramid-516729ac8976a6e9ab3c43cef7b754ec6a7518a3.zip | |
Minor tweaks.
Diffstat (limited to 'repoze/bfg/testing.py')
| -rw-r--r-- | repoze/bfg/testing.py | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/repoze/bfg/testing.py b/repoze/bfg/testing.py index 8bfcac58e..55ecc6d17 100644 --- a/repoze/bfg/testing.py +++ b/repoze/bfg/testing.py @@ -230,28 +230,37 @@ class DummyModel: class DummyRequest: """ A dummy request object (imitates a WebOb request object) """ implements(IRequest) - def __init__(self, path='/', params=None, environ=None, headers=None, **kw): + method = 'GET' + application_url = 'http://example.com' + host = 'example.com:80' + def __init__(self, params=None, environ=None, headers=None, path='/', + cookies=None, **kw): if environ is None: environ = {} if params is None: params = {} if headers is None: headers = {} + if cookies is None: + cookies = {} self.environ = environ self.headers = headers self.params = params + self.cookies = cookies self.GET = params self.POST = params - self.application_url = 'http://example.com' self.host_url = self.application_url self.path_url = self.application_url + self.url = self.application_url self.path = path self.path_info = path self.script_name = '' self.path_qs = '' - self.url = self.application_url - self.host = 'example.com:80' self.body = '' self.cookies = {} + self.view_name = '' + self.subpath = [] + self.context = None + self.marshalled = params # repoze.monty self.__dict__.update(kw) |
