File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -115,21 +115,11 @@ def test_cache_response_no_store(self):
115
115
cc .cache_response (self .req (), resp )
116
116
assert not cc .cache .get (cache_url )
117
117
118
- def test_cache_response_no_store_with_etag (self ):
119
- resp = Mock ()
120
- cache = DictCache ({self .url : resp })
121
- cc = CacheController (cache )
122
-
123
- cache_url = cc .cache_url (self .url )
124
-
118
+ def test_cache_response_no_store_with_etag (self , cc ):
125
119
resp = self .resp ({'cache-control' : 'no-store' , 'ETag' : 'jfd9094r808' })
126
- assert cc .cache .get (cache_url )
127
-
128
- # skip serializer as it can't handle mocks
129
- cc .serializer = Mock ()
130
- cc .serializer .loads .return_value = resp
131
120
cc .cache_response (self .req (), resp )
132
- assert not cc .cache .get (cache_url )
121
+
122
+ assert not cc .cache .set .called
133
123
134
124
def test_update_cached_response_with_valid_headers (self ):
135
125
cached_resp = Mock (headers = {'ETag' : 'jfd9094r808' , 'Content-Length' : 100 })
You can’t perform that action at this time.
0 commit comments