def test_start(self): """ Test to start the specified service """ with patch.dict( smf.__salt__, {"cmd.retcode": MagicMock(side_effect=[False, 3, None, False, 4])}, ): self.assertTrue(smf.start("name")) self.assertTrue(smf.start("name")) self.assertFalse(smf.start("name"))
def test_start(self): ''' Test to start the specified service ''' with patch.dict( smf.__salt__, {'cmd.retcode': MagicMock(side_effect=[False, 3, None, False, 4]) }): self.assertTrue(smf.start('name')) self.assertTrue(smf.start('name')) self.assertFalse(smf.start('name'))