Beispiel #1
0
    def test_setidleactivation(self, gsettings_mock):
        '''
        Test for Set whether the idle activation is enabled
        '''
        self.assertFalse(gnomedesktop.setIdleActivation('kvalue'))

        with patch.object(gsettings_mock, '_set', return_value=True):
            self.assertTrue(gnomedesktop.setIdleActivation(True))
Beispiel #2
0
    def test_setidleactivation(self, gsettings_mock):
        '''
        Test for Set whether the idle activation is enabled
        '''
        self.assertFalse(gnomedesktop.setIdleActivation('kvalue'))

        with patch.object(gsettings_mock, '_set', return_value=True):
            self.assertTrue(gnomedesktop.setIdleActivation(True))
    def test_setidleactivation(self):
        """
        Test for Set whether the idle activation is enabled
        """
        with patch("salt.modules.gnomedesktop._GSettings") as gsettings_mock:
            self.assertFalse(gnomedesktop.setIdleActivation("kvalue"))

            with patch.object(gsettings_mock, "_set", return_value=True):
                self.assertTrue(gnomedesktop.setIdleActivation(True))