Exemplo n.º 1
0
 def test_check_utm_ewf_status_exception_1(self):
     try:
        utm_command.check_utm_ewf_status() 
     except Exception as err:
         self.assertEqual(
             err.args[0],
              "Device handle is a mandatory argument")
Exemplo n.º 2
0
 def test_check_utm_ewf_status_exception_31(self):
     lst = [Response("Server status: using Websense server DOWN")]
     self.mocked_obj.cli = MagicMock(side_effect=lst)
     try:
         utm_command.check_utm_ewf_status(device=self.mocked_obj, server="juniper_local")
     except Exception as err:
         self.assertEqual(
             err.args[0],
             "UTM status is not expected here")
Exemplo n.º 3
0
 def test_check_utm_ewf_status_exception_22(self):
     lst = [Response("Down")]
     self.mocked_obj.cli = MagicMock(side_effect=lst)
     try:
         utm_command.check_utm_ewf_status(device=self.mocked_obj, server="websense_redirect")
     except Exception as err:
         self.assertEqual(
             err.args[0],
             "Websense Redirect profile is not enabled")
Exemplo n.º 4
0
 def test_check_utm_ewf_status_exception_12(self):
     lst = [Response("Down")]
     self.mocked_obj.cli = MagicMock(side_effect=lst)
     try:
         utm_command.check_utm_ewf_status(device=self.mocked_obj)
     except Exception as err:
         self.assertEqual(
             err.args[0],
             "Juniper Enhanced profile is not enabled")
Exemplo n.º 5
0
 def test_check_utm_ewf_status_execution_31(self):
     lst = [Response("Server status: Juniper local using Websense server UP")]
     self.mocked_obj.cli = MagicMock(side_effect=lst)
     self.assertEqual(utm_command.check_utm_ewf_status(device=self.mocked_obj, server="juniper_local"), True)
Exemplo n.º 6
0
 def test_check_utm_ewf_status_execution_21(self):
     lst = [Response("Server status: Websense Redirect using Websense server UP")]
     self.mocked_obj.cli = MagicMock(side_effect=lst)
     self.assertEqual(utm_command.check_utm_ewf_status(device=self.mocked_obj, server="websense_redirect"), True)