def test_installed_bundle_not(self): ''' Test checking to see if a bundle id is installed as being able to use assistive access ''' with patch('salt.modules.mac_assistive._get_assistive_access', MagicMock(return_value=[])): self.assertFalse(assistive.installed('foo'))
def test_installed_bundle_not(self): """ Test checking to see if a bundle id is installed as being able to use assistive access """ with patch( "salt.modules.mac_assistive._get_assistive_access", MagicMock(return_value=[]), ): self.assertFalse(assistive.installed("foo"))
def test_installed_bundle(): """ Test checking to see if a bundle id is installed as being able to use assistive access """ with patch( "salt.modules.mac_assistive._get_assistive_access", MagicMock(return_value=[("foo", 0)]), ): assert assistive.installed("foo")
def test_installed_bundle_not(self): ''' Test checking to see if a bundle id is installed as being able to use assistive access ''' mock = MagicMock( return_value="kTCCServiceAccessibility|/bin/bash|1|1|1|\n" "kTCCServiceAccessibility|com.apple.Safari|0|1|1|") with patch.dict(assistive.__salt__, {'cmd.run': mock}): out = assistive.installed('com.apple.Chess') mock.assert_called_once_with( 'sqlite3 "/Library/Application Support/com.apple.TCC/TCC.db"' ' "SELECT * FROM access"') self.assertEqual(out, False)
def test_installed_bundle_not(self): ''' Test checking to see if a bundle id is installed as being able to use assistive access ''' self.assertFalse(assistive.installed('foo'))
def test_installed_bundle_not(): """ Test checking to see if a bundle id is installed as being able to use assistive access """ assert not assistive.installed("foo")