Stub to replace urlopen for testing.
(url, data=None)
| 12 | |
| 13 | |
| 14 | def urlopen_stub(url, data=None): |
| 15 | '''Stub to replace urlopen for testing.''' |
| 16 | if url == valid_httpurl(): |
| 17 | tmpfile = NamedTemporaryFile(prefix='urltmp_') |
| 18 | return tmpfile |
| 19 | else: |
| 20 | raise URLError('Name or service not known') |
| 21 | |
| 22 | |
| 23 | # setup and teardown |
nothing calls this directly
no test coverage detected
searching dependent graphs…