Beispiel #1
0
    def test_enabled(self):
        '''
        Test to check to see if the named service is enabled to start on boot
        '''
        with patch.dict(
                smf.__salt__, {
                    'cmd.run':
                    MagicMock(
                        side_effect=['fmri', 'A B true', 'fmri', 'A B false'])
                }):
            self.assertTrue(smf.enabled('name'))

            self.assertFalse(smf.enabled('name'))
    def test_enabled(self):
        """
        Test to check to see if the named service is enabled to start on boot
        """
        with patch.dict(
                smf.__salt__,
            {
                "cmd.run":
                MagicMock(
                    side_effect=["fmri", "A B true", "fmri", "A B false"])
            },
        ):
            self.assertTrue(smf.enabled("name"))

            self.assertFalse(smf.enabled("name"))