コード例 #1
0
 def test_get_running(self):
     """
     Test to return the running services
     """
     with patch.dict(smf.__salt__,
                     {"cmd.run": MagicMock(return_value="A online\n")}):
         self.assertEqual(smf.get_running(), ["A"])
コード例 #2
0
 def test_get_running(self):
     '''
     Test to return the running services
     '''
     with patch.dict(smf.__salt__,
                     {'cmd.run': MagicMock(return_value='A online\n')}):
         self.assertEqual(smf.get_running(), ['A'])