@@ -1749,6 +1749,9 @@ def test_entitlements_app_groups_match(self):
17491749 },
17501750 'Version' : 1 ,
17511751 },
1752+ 'extra_keys_to_match_profile' : [
1753+ 'com.apple.security.application-groups' ,
1754+ ],
17521755 },
17531756 }, plist1 )
17541757
@@ -1770,6 +1773,9 @@ def test_entitlements_app_groups_wildcard_no_match(self):
17701773 },
17711774 'Version' : 1 ,
17721775 },
1776+ 'extra_keys_to_match_profile' : [
1777+ 'com.apple.security.application-groups' ,
1778+ ],
17731779 },
17741780 })
17751781
@@ -1793,7 +1799,7 @@ def test_entitlements_no_app_groups_requested(self):
17931799 def test_entitlements_app_groups_not_allowed (self ):
17941800 with self .assertRaisesRegex (
17951801 plisttool .PlistToolError ,
1796- re .escape (plisttool .ENTITLEMENTS_HAS_GROUP_PROFILE_DOES_NOT % (
1802+ re .escape (plisttool .ENTITLEMENTS_MISSING % (
17971803 _testing_target , 'com.apple.security.application-groups' ))):
17981804 _plisttool_result ({
17991805 'plists' : [{
@@ -1808,6 +1814,9 @@ def test_entitlements_app_groups_not_allowed(self):
18081814 },
18091815 'Version' : 1 ,
18101816 },
1817+ 'extra_keys_to_match_profile' : [
1818+ 'com.apple.security.application-groups' ,
1819+ ],
18111820 },
18121821 })
18131822
@@ -1832,6 +1841,9 @@ def test_entitlements_app_groups_mismatch(self):
18321841 },
18331842 'Version' : 1 ,
18341843 },
1844+ 'extra_keys_to_match_profile' : [
1845+ 'com.apple.security.application-groups' ,
1846+ ],
18351847 },
18361848 })
18371849
@@ -1886,24 +1898,9 @@ def test_entitlements_aps_environment_missing_profile(self):
18861898 },
18871899 'Version' : 1 ,
18881900 },
1889- },
1890- }, plist )
1891-
1892- def test_entitlements_aps_environment_mismatch_default_validation (self ):
1893- with self .assertRaisesRegex (
1894- plisttool .PlistToolError ,
1895- re .escape (plisttool .ENTITLEMENTS_VALUE_MISMATCH % (
1896- _testing_target , 'aps-environment' , 'production' , 'development' ))):
1897- plist = {'aps-environment' : 'production' }
1898- self ._assert_plisttool_result ({
1899- 'plists' : [plist ],
1900- 'entitlements_options' : {
1901- 'profile_metadata_file' : {
1902- 'Entitlements' : {
1903- 'aps-environment' : 'development' ,
1904- },
1905- 'Version' : 1 ,
1906- },
1901+ 'extra_keys_to_match_profile' : [
1902+ 'aps-environment' ,
1903+ ],
19071904 },
19081905 }, plist )
19091906
@@ -1928,21 +1925,6 @@ def test_entitlements_aps_environment_mismatch(self):
19281925 },
19291926 }, plist )
19301927
1931- def test_attest_valid_default_validation (self ):
1932- plist = {
1933- 'com.apple.developer.devicecheck.appattest-environment' : 'development' }
1934- self ._assert_plisttool_result ({
1935- 'plists' : [plist ],
1936- 'entitlements_options' : {
1937- 'profile_metadata_file' : {
1938- 'Entitlements' : {
1939- 'com.apple.developer.devicecheck.appattest-environment' : ['development' , 'production' ],
1940- },
1941- 'Version' : 1 ,
1942- },
1943- },
1944- }, plist )
1945-
19461928 def test_attest_valid (self ):
19471929 plist = {
19481930 'com.apple.developer.devicecheck.appattest-environment' : 'development' }
@@ -1963,28 +1945,6 @@ def test_attest_valid(self):
19631945 },
19641946 }, plist )
19651947
1966- def test_attest_mismatch_default_validation (self ):
1967- with self .assertRaisesRegex (
1968- plisttool .PlistToolError ,
1969- re .escape (plisttool .ENTITLEMENTS_VALUE_NOT_IN_LIST %
1970- (_testing_target ,
1971- 'com.apple.developer.devicecheck.appattest-environment' ,
1972- 'foo' , ['development' ]))):
1973- plist = {'com.apple.developer.devicecheck.appattest-environment' : 'foo' }
1974- self ._assert_plisttool_result (
1975- {
1976- 'plists' : [plist ],
1977- 'entitlements_options' : {
1978- 'profile_metadata_file' : {
1979- 'Entitlements' : {
1980- 'com.apple.developer.devicecheck.appattest-environment' :
1981- ['development' ],
1982- },
1983- 'Version' : 1 ,
1984- },
1985- },
1986- }, plist )
1987-
19881948 def test_attest_mismatch (self ):
19891949 with self .assertRaisesRegex (
19901950 plisttool .PlistToolError ,
@@ -2057,20 +2017,6 @@ def test_entitlements_profile_missing_beta_reports_active(self):
20572017 },
20582018 }, plist )
20592019
2060- def test_entitlements_missing_wifi_info_active_default_validation (self ):
2061- plist = {}
2062- self ._assert_plisttool_result ({
2063- 'plists' : [plist ],
2064- 'entitlements_options' : {
2065- 'profile_metadata_file' : {
2066- 'Entitlements' : {
2067- 'com.apple.developer.networking.wifi-info' : True ,
2068- },
2069- 'Version' : 1 ,
2070- },
2071- },
2072- }, plist )
2073-
20742020 def test_entitlements_missing_wifi_info_active (self ):
20752021 plist = {}
20762022 self ._assert_plisttool_result ({
@@ -2088,25 +2034,6 @@ def test_entitlements_missing_wifi_info_active(self):
20882034 },
20892035 }, plist )
20902036
2091- def test_entitlements_wifi_info_active_mismatch_default_validation (self ):
2092- with self .assertRaisesRegex (
2093- plisttool .PlistToolError ,
2094- re .escape (plisttool .ENTITLEMENTS_VALUE_MISMATCH % (
2095- _testing_target , 'com.apple.developer.networking.wifi-info' ,
2096- 'False' , 'True' ))):
2097- plist = {'com.apple.developer.networking.wifi-info' : False }
2098- self ._assert_plisttool_result ({
2099- 'plists' : [plist ],
2100- 'entitlements_options' : {
2101- 'profile_metadata_file' : {
2102- 'Entitlements' : {
2103- 'com.apple.developer.networking.wifi-info' : True ,
2104- },
2105- 'Version' : 1 ,
2106- },
2107- },
2108- }, plist )
2109-
21102037 def test_entitlements_wifi_info_active_mismatch (self ):
21112038 with self .assertRaisesRegex (
21122039 plisttool .PlistToolError ,
@@ -2145,26 +2072,6 @@ def test_entitlements_wifi_info_active_mismatch_with_no_extra_keys_to_match(self
21452072 },
21462073 }, plist )
21472074
2148- def test_entitlements_profile_missing_wifi_info_active_default_validation (self ):
2149- with self .assertRaisesRegex (
2150- plisttool .PlistToolError ,
2151- re .escape (
2152- plisttool .ENTITLEMENTS_MISSING %
2153- (_testing_target , 'com.apple.developer.networking.wifi-info' ))):
2154- plist = {'com.apple.developer.networking.wifi-info' : True }
2155- self ._assert_plisttool_result ({
2156- 'plists' : [plist ],
2157- 'entitlements_options' : {
2158- 'profile_metadata_file' : {
2159- 'Entitlements' : {
2160- 'application-identifier' : 'QWERTY.*' ,
2161- # No wifi-info
2162- },
2163- 'Version' : 1 ,
2164- },
2165- },
2166- }, plist )
2167-
21682075 def test_entitlements_profile_missing_wifi_info_active (self ):
21692076 with self .assertRaisesRegex (
21702077 plisttool .PlistToolError ,
0 commit comments