(self)
| 165 | os_helper.unlink(file_location) |
| 166 | |
| 167 | def test_basic(self): |
| 168 | # Test basic functionality. |
| 169 | with self.urlretrieve(self.logo) as (file_location, info): |
| 170 | self.assertTrue(os.path.exists(file_location), "file location returned by" |
| 171 | " urlretrieve is not a valid path") |
| 172 | with open(file_location, 'rb') as f: |
| 173 | self.assertTrue(f.read(), "reading from the file location returned" |
| 174 | " by urlretrieve failed") |
| 175 | |
| 176 | def test_specified_path(self): |
| 177 | # Make sure that specifying the location of the file to write to works. |
nothing calls this directly
no test coverage detected