For one, it makes no sense (it won't be visible from outside the function anyway), for another, it didn't work, because it was called from different scope (inside the FailingStatsHttpd class) and mangling the name wrongly.
@@ -651,13 +651,13 @@ class TestStatsHttpd(unittest.TestCase):
"""
self.__mccs_closed = False
- def __call_checker():
+ def call_checker():
self.__mccs_closed = True
class FailingStatsHttpd(MyStatsHttpd):
def open_httpd(self):
raise stats_httpd.HttpServerError
def close_mccs(self):
- __call_checker()
+ call_checker()
self.assertRaises(stats_httpd.HttpServerError, FailingStatsHttpd)
self.assertTrue(self.__mccs_closed)