コード例 #1
0
ファイル: test_mac_assistive.py プロジェクト: MalloZup/salt-2
 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'))
コード例 #2
0
ファイル: test_mac_assistive.py プロジェクト: MalloZup/salt-2
 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'))
コード例 #3
0
 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"))
コード例 #4
0
    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)
コード例 #5
0
 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"))
コード例 #6
0
 def test_enabled_assistive_false(self):
     '''
     Test if a bundle ID is disabled for assistive access
     '''
     self.assertFalse(assistive.enabled('foo'))
コード例 #7
0
 def test_enabled_assistive(self):
     '''
     Test enabling a bundle ID as being allowed to run with assistive access
     '''
     self.assertTrue(assistive.enabled('foo'))
コード例 #8
0
ファイル: mac_assistive_test.py プロジェクト: bryson/salt
 def test_enabled_assistive_false(self):
     '''
     Test if a bundle ID is disabled for assistive access
     '''
     self.assertFalse(assistive.enabled('foo'))
コード例 #9
0
ファイル: mac_assistive_test.py プロジェクト: bryson/salt
 def test_enabled_assistive(self):
     '''
     Test enabling a bundle ID as being allowed to run with assistive access
     '''
     self.assertTrue(assistive.enabled('foo'))
コード例 #10
0
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")
コード例 #11
0
def test_enabled_assistive():
    """
    Test enabling a bundle ID as being allowed to run with assistive access
    """
    assistive.install("foo")
    assert assistive.enabled("foo")