MCPcopy Create free account
hub / github.com/bleachbit/bleachbit / test_check_updates_bad_url

Method test_check_updates_bad_url

tests/TestUpdate.py:92–101  ·  view source on GitHub ↗

Unit test for function check_updates() with bad network address

(self)

Source from the content-addressed store, hash-verified

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"""

Callers

nothing calls this directly

Calls 1

check_updatesFunction · 0.90

Tested by

no test coverage detected