Пример #1
0
 def test_send_use_master_when_local_false(self):
     """
     Test for Send an event when opts has use_master_when_local and its False
     """
     patch_master_opts = patch.dict(event.__opts__,
                                    {"use_master_when_local": False})
     patch_file_client = patch.dict(event.__opts__,
                                    {"file_client": "local"})
     with patch.object(event, "fire", return_value="B") as patch_send:
         with patch_master_opts, patch_file_client, patch_send:
             self.assertEqual(event.send("tag"), "B")
             patch_send.assert_called_once()
Пример #2
0
 def test_send(self):
     '''
     Test for Send an event to the Salt Master
     '''
     with patch.object(event, 'fire_master', return_value='B'):
         self.assertEqual(event.send('tag'), 'B')
Пример #3
0
 def test_send(self):
     """
     Test for Send an event to the Salt Master
     """
     with patch.object(event, "fire_master", return_value="B"):
         self.assertEqual(event.send("tag"), "B")
Пример #4
0
 def test_send(self):
     """
     Test for Send an event to the Salt Master
     """
     with patch.object(event, "fire_master", return_value="B"):
         self.assertEqual(event.send("tag"), "B")
Пример #5
0
 def test_send(self):
     '''
     Test for Send an event to the Salt Master
     '''
     with patch.object(event, 'fire_master', return_value='B'):
         self.assertEqual(event.send('tag'), 'B')