Exemple #1
0
 def test_status(self):
     '''
     Test if it return rabbitmq status.
     '''
     mock_run = MagicMock(return_value='saltstack')
     with patch.dict(rabbitmq.__salt__, {'cmd.run': mock_run}):
         self.assertEqual(rabbitmq.status(), 'saltstack')
Exemple #2
0
 def test_status(self):
     '''
     Test if it return rabbitmq status.
     '''
     mock_run = MagicMock(return_value='saltstack')
     with patch.dict(rabbitmq.__salt__, {'cmd.run': mock_run}):
         self.assertEqual(rabbitmq.status(), 'saltstack')
Exemple #3
0
 def test_status(self):
     '''
     Test if it return rabbitmq status.
     '''
     mock_run = MagicMock(return_value={'retcode': 0, 'stdout': 'saltstack', 'stderr': ''})
     with patch.dict(rabbitmq.__salt__, {'cmd.run_all': mock_run}):
         self.assertEqual(rabbitmq.status(), 'saltstack')
Exemple #4
0
 def test_status(self):
     '''
     Test if it return rabbitmq status.
     '''
     mock_run = MagicMock(return_value={'retcode': 0, 'stdout': 'saltstack', 'stderr': ''})
     with patch.dict(rabbitmq.__salt__, {'cmd.run_all': mock_run}):
         self.assertEqual(rabbitmq.status(), 'saltstack')
 def test_status(self):
     """
     Test if it return rabbitmq status.
     """
     mock_run = MagicMock(
         return_value={"retcode": 0, "stdout": "saltstack", "stderr": ""}
     )
     with patch.dict(rabbitmq.__salt__, {"cmd.run_all": mock_run}):
         self.assertEqual(rabbitmq.status(), "saltstack")