Unit test for function check_updates() with bad network address
(self)
| 90 | self.assertIsInstance(url, (type(None), str)) |
| 91 | |
| 92 | def test_check_updates_bad_url(self): |
| 93 | """Unit test for function check_updates() with bad network address""" |
| 94 | # expect connection failure |
| 95 | preserve_url = bleachbit.update_check_url |
| 96 | for url in ('http://localhost/doesnotexist', 'https://httpstat.us/500'): |
| 97 | bleachbit.update_check_url = url |
| 98 | self.assertEqual( |
| 99 | check_updates(True, False, None, None), |
| 100 | ()) |
| 101 | bleachbit.update_check_url = preserve_url |
| 102 | |
| 103 | def test_update_url(self): |
| 104 | """Check that the real update URL returns XML""" |
nothing calls this directly
no test coverage detected