@unittest.skip('Cannot pass under python3. Needs fixing.')
@ResourceGroupPreparer(location='canadacentral')
def test_download_linux_web_log(self, resource_group):
    import zipfile
    webapp_name = self.create_random_name(prefix='webapp-linux-log', length=24)
    plan = self.create_random_name(prefix='linux-log', length=24)
    self.cmd('appservice plan create -g {} -n {} --is-linux'.format(resource_group, plan))
    self.cmd('webapp create -g {} -n {} --plan {} -i patle/ruby-hello'.format(resource_group, webapp_name, plan))
    requests.get('http://{}.azurewebsites.net'.format(webapp_name), timeout=240)
    (_, log_file) = tempfile.mkstemp()
    log_dir = (log_file + '-dir')
    self.cmd('webapp log download -g {} -n {} --log-file "{}"'.format(resource_group, webapp_name, log_file))
    zip_ref = zipfile.ZipFile(log_file, 'r')
    zip_ref.extractall(log_dir)
    self.assertTrue(os.path.isdir(os.path.join(log_dir, 'LogFiles', 'kudu', 'trace')))
@unittest.skip('Cannot pass under python3. Needs fixing.')
@ResourceGroupPreparer(location='canadacentral')
def test_download_linux_web_log(self, resource_group):
    import zipfile
    webapp_name = self.create_random_name(prefix='webapp-linux-log', length=24)
    plan = self.create_random_name(prefix='linux-log', length=24)
    self.cmd('appservice plan create -g {} -n {} --is-linux'.format(resource_group, plan))
    self.cmd('webapp create -g {} -n {} --plan {} -i patle/ruby-hello'.format(resource_group, webapp_name, plan))
    requests.get('http://{}.azurewebsites.net'.format(webapp_name), timeout=240)
    (_, log_file) = tempfile.mkstemp()
    log_dir = (log_file + '-dir')
    self.cmd('webapp log download -g {} -n {} --log-file "{}"'.format(resource_group, webapp_name, log_file))
    zip_ref = zipfile.ZipFile(log_file, 'r')
    zip_ref.extractall(log_dir)
    self.assertTrue(os.path.isdir(os.path.join(log_dir, 'LogFiles', 'kudu', 'trace')))