(self, tmp_path)
| 288 | assert_(repos.exists(valid_httpurl())) |
| 289 | |
| 290 | def test_CachedHTTPFile(self, tmp_path): |
| 291 | localfile = valid_httpurl() |
| 292 | # Create a locally cached temp file with a URL based |
| 293 | # directory structure. This is similar to what Repository.open |
| 294 | # would do. |
| 295 | repos = datasource.Repository(valid_baseurl(), tmp_path) |
| 296 | _, netloc, _, _, _, _ = urlparse(localfile) |
| 297 | local_path = os.path.join(repos._destpath, netloc) |
| 298 | os.mkdir(local_path, 0o0700) |
| 299 | tmpfile = valid_textfile(local_path) |
| 300 | assert_(repos.exists(tmpfile)) |
| 301 | |
| 302 | |
| 303 | class TestOpenFunc: |
nothing calls this directly
no test coverage detected