(self)
| 68 | class LatestVersionTest(TestCase): |
| 69 | |
| 70 | def setUp(self): |
| 71 | # Run all unit tests with version's debug mode enabled. |
| 72 | version_is_debug_patch = mock.patch.object(version, |
| 73 | '_is_debug', |
| 74 | return_value=True) |
| 75 | self.addCleanup(version_is_debug_patch.stop) |
| 76 | version_is_debug_patch.start() |
| 77 | |
| 78 | @mock.patch.object(urllib.request, 'urlopen') |
| 79 | def test_latest_version_when_request_is_successful(self, mock_urlopen): |