def test_enabled_assistive(self): ''' Test enabling a bundle ID as being allowed to run with assistive access ''' with patch('salt.modules.mac_assistive._get_assistive_access', MagicMock(return_value=[('foo', '1')])): self.assertTrue(assistive.enabled('foo'))
def test_enabled_assistive_false(self): ''' Test if a bundle ID is disabled for assistive access ''' with patch('salt.modules.mac_assistive._get_assistive_access', MagicMock(return_value=[])): self.assertFalse(assistive.enabled('foo'))
def test_enabled_assistive(self): """ Test enabling a bundle ID as being allowed to run with assistive access """ with patch( "salt.modules.mac_assistive._get_assistive_access", MagicMock(return_value=[("foo", "1")]), ): self.assertTrue(assistive.enabled("foo"))
def test_enabled_assistive(self, get_assistive_mock): ''' Test if a bundle ID is enabled for assistive access ''' get_assistive_mock.return_value = [("com.apple.Chess", '1')] out = assistive.enabled('com.apple.Chess') get_assistive_mock.assert_called_once_with() self.assertTrue(out)
def test_enabled_assistive_false(self): """ Test if a bundle ID is disabled for assistive access """ with patch( "salt.modules.mac_assistive._get_assistive_access", MagicMock(return_value=[]), ): self.assertFalse(assistive.enabled("foo"))
def test_enabled_assistive_false(self): ''' Test if a bundle ID is disabled for assistive access ''' self.assertFalse(assistive.enabled('foo'))
def test_enabled_assistive(self): ''' Test enabling a bundle ID as being allowed to run with assistive access ''' self.assertTrue(assistive.enabled('foo'))
def test_enabled_assistive_false(): """ Test if a bundle ID is disabled for assistive access """ assistive.install("foo", enable=False) assert not assistive.enabled("foo")
def test_enabled_assistive(): """ Test enabling a bundle ID as being allowed to run with assistive access """ assistive.install("foo") assert assistive.enabled("foo")