Skip to content

Commit

Permalink
Fix DummyRequest so that response is created each time
Browse files Browse the repository at this point in the history
Due to only creating the DummyRequest once various mutations were
bleeding across various different tests. With hilarious results.
  • Loading branch information
digitalresistor committed Sep 6, 2013
1 parent e8b1cf5 commit 6ef10d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyramid/tests/test_config/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3852,14 +3852,14 @@ class DummyResponse(object):
class DummyRequest:
subpath = ()
matchdict = None
response = DummyResponse()

def __init__(self, environ=None):
if environ is None:
environ = {}
self.environ = environ
self.params = {}
self.cookies = {}
self.response = DummyResponse()

class DummyContext:
pass
Expand Down

0 comments on commit 6ef10d6

Please sign in to comment.