Pylons/pyramid — Issue #371: testing.DummyRequest has no is_xhr attribute
Author: xrotwang
Created: 2011-12-07 09:18:44+00:00
State: open

While pyramid.request.Request objects have a is_xhr attribute, pyramid.testing.DummyRequest objects do not.

>>> from pyramid.request import Request
>>> req = Request({})
>>> req.is_xhr
False
>>> from pyramid.testing import DummyRequest
>>> req = DummyRequest()
>>> req.is_xhr
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'DummyRequest' object has no attribute 'is_xhr'