@@ -133,6 +133,13 @@ def test_supported_api_version_min_constraint_mixed_type(self):
133133 with mock .patch ('azure.cli.core.profiles._shared.AZURE_API_PROFILES' , test_profile ):
134134 self .assertTrue (supported_api_version (cli , ResourceType .MGMT_KEYVAULT , min_api = '2016-06-04' ))
135135
136+ def test_supported_api_version_min_constraint_none (self ):
137+ cli = DummyCli ()
138+ cli .cloud = Cloud ('TestCloud' , profile = '2017-01-01-profile' )
139+ test_profile = {'2017-01-01-profile' : {ResourceType .MGMT_STORAGE : None }}
140+ with mock .patch ('azure.cli.core.profiles._shared.AZURE_API_PROFILES' , test_profile ):
141+ self .assertTrue (supported_api_version (cli , ResourceType .MGMT_STORAGE , min_api = '2000-01-01' ))
142+
136143 def test_supported_api_version_max_constraint (self ):
137144 cli = DummyCli ()
138145 cli .cloud = Cloud ('TestCloud' , profile = '2017-01-01-profile' )
@@ -154,6 +161,13 @@ def test_supported_api_version_max_constraint_mixed_type(self):
154161 with mock .patch ('azure.cli.core.profiles._shared.AZURE_API_PROFILES' , test_profile ):
155162 self .assertTrue (supported_api_version (cli , ResourceType .MGMT_KEYVAULT , max_api = '8.0' ))
156163
164+ def test_supported_api_version_max_constraint_none (self ):
165+ cli = DummyCli ()
166+ cli .cloud = Cloud ('TestCloud' , profile = '2017-01-01-profile' )
167+ test_profile = {'2017-01-01-profile' : {ResourceType .MGMT_STORAGE : None }}
168+ with mock .patch ('azure.cli.core.profiles._shared.AZURE_API_PROFILES' , test_profile ):
169+ self .assertTrue (supported_api_version (cli , ResourceType .MGMT_STORAGE , max_api = '2021-01-01' ))
170+
157171 def test_supported_api_version_min_max_constraint (self ):
158172 cli = DummyCli ()
159173 cli .cloud = Cloud ('TestCloud' , profile = '2017-01-01-profile' )
@@ -170,6 +184,14 @@ def test_supported_api_version_min_max_constraint_semver(self):
170184 self .assertTrue (
171185 supported_api_version (cli , ResourceType .MGMT_KEYVAULT , min_api = '6.0' , max_api = '8.0' ))
172186
187+ def test_supported_api_version_min_max_constraint_none (self ):
188+ cli = DummyCli ()
189+ cli .cloud = Cloud ('TestCloud' , profile = '2017-01-01-profile' )
190+ test_profile = {'2017-01-01-profile' : {ResourceType .MGMT_STORAGE : None }}
191+ with mock .patch ('azure.cli.core.profiles._shared.AZURE_API_PROFILES' , test_profile ):
192+ self .assertTrue (
193+ supported_api_version (cli , ResourceType .MGMT_STORAGE , min_api = '2000-01-01' , max_api = '2021-01-01' ))
194+
173195 def test_supported_api_version_max_constraint_not_supported (self ):
174196 cli = DummyCli ()
175197 cli .cloud = Cloud ('TestCloud' , profile = '2017-01-01-profile' )
0 commit comments