@@ -83,22 +83,22 @@ def test_basic_caching(changing_mocked_response):
83
83
assert cache_conf .cache_active
84
84
85
85
mytest .clear_cache ()
86
- assert len (os .listdir (mytest .get_cache_location () )) == 0
86
+ assert len (os .listdir (mytest .cache_location )) == 0
87
87
88
88
resp = mytest .test_func (URL1 )
89
89
assert resp .content == TEXT1
90
- assert len (os .listdir (mytest .get_cache_location () )) == 1
90
+ assert len (os .listdir (mytest .cache_location )) == 1
91
91
92
92
resp = mytest .test_func (URL2 ) # query that has not been cached
93
93
assert resp .content == TEXT2
94
- assert len (os .listdir (mytest .get_cache_location () )) == 2
94
+ assert len (os .listdir (mytest .cache_location )) == 2
95
95
96
96
resp = mytest .test_func (URL1 )
97
97
assert resp .content == TEXT1 # query that was cached
98
- assert len (os .listdir (mytest .get_cache_location () )) == 2 # no new cache file
98
+ assert len (os .listdir (mytest .cache_location )) == 2 # no new cache file
99
99
100
100
mytest .clear_cache ()
101
- assert len (os .listdir (mytest .get_cache_location () )) == 0
101
+ assert len (os .listdir (mytest .cache_location )) == 0
102
102
103
103
resp = mytest .test_func (URL1 )
104
104
assert resp .content == TEXT2 # Now get new response
@@ -135,11 +135,11 @@ def test_login(changing_mocked_response):
135
135
assert cache_conf .cache_active
136
136
137
137
mytest .clear_cache ()
138
- assert len (os .listdir (mytest .get_cache_location () )) == 0
138
+ assert len (os .listdir (mytest .cache_location )) == 0
139
139
140
140
mytest .login ("ceb" )
141
141
assert mytest .authenticated ()
142
- assert len (os .listdir (mytest .get_cache_location () )) == 0 # request should not be cached
142
+ assert len (os .listdir (mytest .cache_location )) == 0 # request should not be cached
143
143
144
144
mytest .login ("ceb" )
145
145
assert not mytest .authenticated () # Should not be accessing cache
@@ -152,7 +152,7 @@ def test_timeout(changing_mocked_response, monkeypatch):
152
152
assert cache_conf .cache_active
153
153
154
154
mytest .clear_cache ()
155
- assert len (os .listdir (mytest .get_cache_location () )) == 0
155
+ assert len (os .listdir (mytest .cache_location )) == 0
156
156
157
157
resp = mytest .test_func (URL1 ) # should be cached
158
158
assert resp .content == TEXT1
@@ -184,11 +184,11 @@ def test_deactivate_directly(changing_mocked_response):
184
184
cache_conf .cache_active = False
185
185
186
186
mytest .clear_cache ()
187
- assert len (os .listdir (mytest .get_cache_location () )) == 0
187
+ assert len (os .listdir (mytest .cache_location )) == 0
188
188
189
189
resp = mytest .test_func (URL1 )
190
190
assert resp .content == TEXT1
191
- assert len (os .listdir (mytest .get_cache_location () )) == 0
191
+ assert len (os .listdir (mytest .cache_location )) == 0
192
192
193
193
resp = mytest .test_func (URL1 )
194
194
assert resp .content == TEXT2
0 commit comments