def test_get_default_latest_profile(self): with mock.patch('azure.cli.core.cloud.CLOUD_CONFIG_FILE', tempfile.mkstemp()[1]): cli = DummyCli() clouds = get_clouds(cli) for c in clouds: self.assertEqual(c.profile, 'latest')
def get_cloud_name_completion_list(prefix, action, parsed_args, **kwargs): # pylint: disable=unused-argument return [c.name for c in get_clouds()]
def list_clouds(): return get_clouds()
def _helper_get_clouds(_): """ Helper method for multiprocessing.Pool.map func that uses throwaway arg """ get_clouds(DummyCli())
def _helper_get_clouds(_): """ Helper method for multiprocessing.Pool.map func that uses throwaway arg """ get_clouds()
def test_get_default_latest_profile(self): with mock.patch('azure.cli.core.cloud.CLOUD_CONFIG_FILE', tempfile.mkstemp()[1]): clouds = get_clouds() for c in clouds: self.assertEqual(c.profile, 'latest')
def list_clouds(cmd): return get_clouds(cmd.cli_ctx)