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"))
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'))