Ejemplo n.º 1
0
 def test_filter_defer_with_exception(self):
     try:
         with self.firewall.defer_apply():
             raise Exception("same exception")
     except:
         pass
     self.iptables_inst.assert_has_calls([call.defer_apply_on(), call.defer_apply_off()])
Ejemplo n.º 2
0
 def test_filter_defer_with_exception(self):
     try:
         with self.firewall.defer_apply():
             raise Exception("same exception")
     except Exception:
         pass
     self.iptables_inst.assert_has_calls([call.defer_apply_on(),
                                          call.defer_apply_off()])
Ejemplo n.º 3
0
 def test_defer_apply(self):
     with self.firewall.defer_apply():
         pass
     self.iptables_inst.assert_has_calls([call.defer_apply_on(), call.defer_apply_off()])
Ejemplo n.º 4
0
 def test_defer_apply(self):
     with self.firewall.defer_apply():
         pass
     self.iptables_inst.assert_has_calls([call.defer_apply_on(),
                                          call.defer_apply_off()])