def test_obfuscation(self): req = make_request("/__debug__", _ENVIRON) controller = StandardController(None) def _more_secret(*args): return ['stuff', 'and', 'pymysql://*****:*****@localhost/sync'] controller._debug_server = _more_secret debug = controller._debug(req) # make sure we don't have any password left self.assertTrue('xxxx' not in debug.body)