1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
diff --git a/waffle/tests/test_middleware.py b/waffle/tests/test_middleware.py
index 11af7c9..27293df 100644
--- a/waffle/tests/test_middleware.py
+++ b/waffle/tests/test_middleware.py
@@ -13,7 +13,7 @@ def test_set_cookies():
assert 'dwf_foo' not in resp.cookies
assert 'dwf_bar' not in resp.cookies
- resp = WaffleMiddleware().process_response(get, resp)
+ resp = WaffleMiddleware(lambda request: HttpResponse()).process_response(get, resp)
assert 'dwf_foo' in resp.cookies
assert 'dwf_bar' in resp.cookies
@@ -27,7 +27,7 @@ def test_rollout_cookies():
'baz': [True, False],
'qux': [False, False]}
resp = HttpResponse()
- resp = WaffleMiddleware().process_response(get, resp)
+ resp = WaffleMiddleware(lambda request: HttpResponse()).process_response(get, resp)
for k in get.waffles:
cookie = f'dwf_{k}'
assert cookie in resp.cookies
@@ -42,7 +42,7 @@ def test_testing_cookies():
get.waffles = {}
get.waffle_tests = {'foo': True, 'bar': False}
resp = HttpResponse()
- resp = WaffleMiddleware().process_response(get, resp)
+ resp = WaffleMiddleware(lambda request: HttpResponse()).process_response(get, resp)
for k in get.waffle_tests:
cookie = f'dwft_{k}'
assert str(get.waffle_tests[k]) == resp.cookies[cookie].value
|