File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 6
6
Unit tests that verify our caching methods work correctly.
7
7
"""
8
8
9
+ import os
9
10
import time
10
- from tempfile import mkdtemp
11
11
from unittest .mock import ANY , Mock
12
12
13
13
import pytest
@@ -143,7 +143,7 @@ def test_update_cached_response_no_local_cache(self):
143
143
result = cc .update_cached_response (req , resp )
144
144
assert result is resp
145
145
146
- def test_update_cached_response_with_valid_headers_separate_body (self ):
146
+ def test_update_cached_response_with_valid_headers_separate_body (self , tmp_path ):
147
147
"""
148
148
If the local cache has the given URL ``update_cached_response()`` will:
149
149
@@ -152,7 +152,7 @@ def test_update_cached_response_with_valid_headers_separate_body(self):
152
152
153
153
This is the version for a cache that stores a separate body.
154
154
"""
155
- cache = SeparateBodyFileCache (mkdtemp ( ))
155
+ cache = SeparateBodyFileCache (os . fsdecode ( tmp_path ))
156
156
self .update_cached_response_with_valid_headers_test (cache )
157
157
158
158
def test_update_cached_response_with_valid_headers (self ):
You can’t perform that action at this time.
0 commit comments