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()])
Esempio 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()])
 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()])
Esempio 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()])