1、 如在测试方法中用到了self.router_info_inst,我们可以将它用Mock替换了, self.router_info_inst = mock.Mock()
self.router_info_inst里还有一个iptables_manager属性,我们继续用Mock替换,
self.iptables_inst = mock.Mock()
self.router_info_inst.iptables_manager = self.iptables_inst