@@ -1747,6 +1747,9 @@ def test_entitlements_app_groups_match(self):
17471747 },
17481748 'Version' : 1 ,
17491749 },
1750+ 'extra_keys_to_match_profile' : [
1751+ 'com.apple.security.application-groups' ,
1752+ ],
17501753 },
17511754 }, plist1 )
17521755
@@ -1768,6 +1771,9 @@ def test_entitlements_app_groups_wildcard_no_match(self):
17681771 },
17691772 'Version' : 1 ,
17701773 },
1774+ 'extra_keys_to_match_profile' : [
1775+ 'com.apple.security.application-groups' ,
1776+ ],
17711777 },
17721778 })
17731779
@@ -1791,7 +1797,7 @@ def test_entitlements_no_app_groups_requested(self):
17911797 def test_entitlements_app_groups_not_allowed (self ):
17921798 with self .assertRaisesRegex (
17931799 plisttool .PlistToolError ,
1794- re .escape (plisttool .ENTITLEMENTS_HAS_GROUP_PROFILE_DOES_NOT % (
1800+ re .escape (plisttool .ENTITLEMENTS_MISSING % (
17951801 _testing_target , 'com.apple.security.application-groups' ))):
17961802 _plisttool_result ({
17971803 'plists' : [{
@@ -1806,6 +1812,9 @@ def test_entitlements_app_groups_not_allowed(self):
18061812 },
18071813 'Version' : 1 ,
18081814 },
1815+ 'extra_keys_to_match_profile' : [
1816+ 'com.apple.security.application-groups' ,
1817+ ],
18091818 },
18101819 })
18111820
@@ -1830,6 +1839,9 @@ def test_entitlements_app_groups_mismatch(self):
18301839 },
18311840 'Version' : 1 ,
18321841 },
1842+ 'extra_keys_to_match_profile' : [
1843+ 'com.apple.security.application-groups' ,
1844+ ],
18331845 },
18341846 })
18351847
@@ -1884,24 +1896,9 @@ def test_entitlements_aps_environment_missing_profile(self):
18841896 },
18851897 'Version' : 1 ,
18861898 },
1887- },
1888- }, plist )
1889-
1890- def test_entitlements_aps_environment_mismatch_default_validation (self ):
1891- with self .assertRaisesRegex (
1892- plisttool .PlistToolError ,
1893- re .escape (plisttool .ENTITLEMENTS_VALUE_MISMATCH % (
1894- _testing_target , 'aps-environment' , 'production' , 'development' ))):
1895- plist = {'aps-environment' : 'production' }
1896- self ._assert_plisttool_result ({
1897- 'plists' : [plist ],
1898- 'entitlements_options' : {
1899- 'profile_metadata_file' : {
1900- 'Entitlements' : {
1901- 'aps-environment' : 'development' ,
1902- },
1903- 'Version' : 1 ,
1904- },
1899+ 'extra_keys_to_match_profile' : [
1900+ 'aps-environment' ,
1901+ ],
19051902 },
19061903 }, plist )
19071904
@@ -1926,21 +1923,6 @@ def test_entitlements_aps_environment_mismatch(self):
19261923 },
19271924 }, plist )
19281925
1929- def test_attest_valid_default_validation (self ):
1930- plist = {
1931- 'com.apple.developer.devicecheck.appattest-environment' : 'development' }
1932- self ._assert_plisttool_result ({
1933- 'plists' : [plist ],
1934- 'entitlements_options' : {
1935- 'profile_metadata_file' : {
1936- 'Entitlements' : {
1937- 'com.apple.developer.devicecheck.appattest-environment' : ['development' , 'production' ],
1938- },
1939- 'Version' : 1 ,
1940- },
1941- },
1942- }, plist )
1943-
19441926 def test_attest_valid (self ):
19451927 plist = {
19461928 'com.apple.developer.devicecheck.appattest-environment' : 'development' }
@@ -1961,28 +1943,6 @@ def test_attest_valid(self):
19611943 },
19621944 }, plist )
19631945
1964- def test_attest_mismatch_default_validation (self ):
1965- with self .assertRaisesRegex (
1966- plisttool .PlistToolError ,
1967- re .escape (plisttool .ENTITLEMENTS_VALUE_NOT_IN_LIST %
1968- (_testing_target ,
1969- 'com.apple.developer.devicecheck.appattest-environment' ,
1970- 'foo' , ['development' ]))):
1971- plist = {'com.apple.developer.devicecheck.appattest-environment' : 'foo' }
1972- self ._assert_plisttool_result (
1973- {
1974- 'plists' : [plist ],
1975- 'entitlements_options' : {
1976- 'profile_metadata_file' : {
1977- 'Entitlements' : {
1978- 'com.apple.developer.devicecheck.appattest-environment' :
1979- ['development' ],
1980- },
1981- 'Version' : 1 ,
1982- },
1983- },
1984- }, plist )
1985-
19861946 def test_attest_mismatch (self ):
19871947 with self .assertRaisesRegex (
19881948 plisttool .PlistToolError ,
@@ -2055,20 +2015,6 @@ def test_entitlements_profile_missing_beta_reports_active(self):
20552015 },
20562016 }, plist )
20572017
2058- def test_entitlements_missing_wifi_info_active_default_validation (self ):
2059- plist = {}
2060- self ._assert_plisttool_result ({
2061- 'plists' : [plist ],
2062- 'entitlements_options' : {
2063- 'profile_metadata_file' : {
2064- 'Entitlements' : {
2065- 'com.apple.developer.networking.wifi-info' : True ,
2066- },
2067- 'Version' : 1 ,
2068- },
2069- },
2070- }, plist )
2071-
20722018 def test_entitlements_missing_wifi_info_active (self ):
20732019 plist = {}
20742020 self ._assert_plisttool_result ({
@@ -2086,25 +2032,6 @@ def test_entitlements_missing_wifi_info_active(self):
20862032 },
20872033 }, plist )
20882034
2089- def test_entitlements_wifi_info_active_mismatch_default_validation (self ):
2090- with self .assertRaisesRegex (
2091- plisttool .PlistToolError ,
2092- re .escape (plisttool .ENTITLEMENTS_VALUE_MISMATCH % (
2093- _testing_target , 'com.apple.developer.networking.wifi-info' ,
2094- 'False' , 'True' ))):
2095- plist = {'com.apple.developer.networking.wifi-info' : False }
2096- self ._assert_plisttool_result ({
2097- 'plists' : [plist ],
2098- 'entitlements_options' : {
2099- 'profile_metadata_file' : {
2100- 'Entitlements' : {
2101- 'com.apple.developer.networking.wifi-info' : True ,
2102- },
2103- 'Version' : 1 ,
2104- },
2105- },
2106- }, plist )
2107-
21082035 def test_entitlements_wifi_info_active_mismatch (self ):
21092036 with self .assertRaisesRegex (
21102037 plisttool .PlistToolError ,
@@ -2143,26 +2070,6 @@ def test_entitlements_wifi_info_active_mismatch_with_no_extra_keys_to_match(self
21432070 },
21442071 }, plist )
21452072
2146- def test_entitlements_profile_missing_wifi_info_active_default_validation (self ):
2147- with self .assertRaisesRegex (
2148- plisttool .PlistToolError ,
2149- re .escape (
2150- plisttool .ENTITLEMENTS_MISSING %
2151- (_testing_target , 'com.apple.developer.networking.wifi-info' ))):
2152- plist = {'com.apple.developer.networking.wifi-info' : True }
2153- self ._assert_plisttool_result ({
2154- 'plists' : [plist ],
2155- 'entitlements_options' : {
2156- 'profile_metadata_file' : {
2157- 'Entitlements' : {
2158- 'application-identifier' : 'QWERTY.*' ,
2159- # No wifi-info
2160- },
2161- 'Version' : 1 ,
2162- },
2163- },
2164- }, plist )
2165-
21662073 def test_entitlements_profile_missing_wifi_info_active (self ):
21672074 with self .assertRaisesRegex (
21682075 plisttool .PlistToolError ,
0 commit comments