예제 #1
0
    def test_status(self):
        """
        Test to return the status for a service, returns a bool whether the
        service is running.
        """
        with patch.dict(
                smf.__salt__,
            {"cmd.run": MagicMock(side_effect=["online", "online1"])}):
            self.assertTrue(smf.status("name"))

            self.assertFalse(smf.status("name"))
예제 #2
0
    def test_status(self):
        '''
        Test to return the status for a service, returns a bool whether the
        service is running.
        '''
        with patch.dict(
                smf.__salt__,
            {'cmd.run': MagicMock(side_effect=['online', 'online1'])}):
            self.assertTrue(smf.status('name'))

            self.assertFalse(smf.status('name'))