From 21fc25fbc0e73e15710d2f0333f7d3ba13eb3739 Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Wed, 26 Feb 2014 14:28:46 -0500 Subject: pep8 and pylint --- tests/unittests/test_datasource/test_azure.py | 4 ++-- tests/unittests/test_datasource/test_configdrive.py | 2 +- tests/unittests/test_datasource/test_nocloud.py | 1 + tests/unittests/test_handler/test_handler_growpart.py | 3 +-- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/unittests') diff --git a/tests/unittests/test_datasource/test_azure.py b/tests/unittests/test_datasource/test_azure.py index 44c537f4..ccfd672a 100644 --- a/tests/unittests/test_datasource/test_azure.py +++ b/tests/unittests/test_datasource/test_azure.py @@ -352,13 +352,13 @@ class TestAzureDataSource(MockerTestCase): ovf_env_path = os.path.join(self.waagent_d, 'ovf-env.xml') self.assertTrue(os.path.exists(ovf_env_path)) self.assertEqual(xml, load_file(ovf_env_path)) - + def test_existing_ovf_same(self): # waagent/SharedConfig left alone if found ovf-env.xml same as cached odata = {'UserData': base64.b64encode("SOMEUSERDATA")} data = {'ovfcontent': construct_valid_ovf_env(data=odata)} - populate_dir(self.waagent_d, + populate_dir(self.waagent_d, {'ovf-env.xml': data['ovfcontent'], 'otherfile': 'otherfile-content', 'SharedConfig.xml': 'mysharedconfig'}) diff --git a/tests/unittests/test_datasource/test_configdrive.py b/tests/unittests/test_datasource/test_configdrive.py index 937b88c1..4404668e 100644 --- a/tests/unittests/test_datasource/test_configdrive.py +++ b/tests/unittests/test_datasource/test_configdrive.py @@ -166,7 +166,7 @@ class TestConfigDriveDataSource(MockerTestCase): my_mock.replay() device = cfg_ds.device_name_to_device(name) self.assertEquals(dev_name, device) - + def test_dev_ec2_map(self): populate_dir(self.tmp, CFG_DRIVE_FILES_V2) cfg_ds = ds.DataSourceConfigDrive(settings.CFG_BUILTIN, diff --git a/tests/unittests/test_datasource/test_nocloud.py b/tests/unittests/test_datasource/test_nocloud.py index af575a10..a65833eb 100644 --- a/tests/unittests/test_datasource/test_nocloud.py +++ b/tests/unittests/test_datasource/test_nocloud.py @@ -133,6 +133,7 @@ class TestNoCloudDataSource(MockerTestCase): self.assertFalse(dsrc.vendordata) self.assertTrue(ret) + class TestParseCommandLineData(MockerTestCase): def test_parse_cmdline_data_valid(self): diff --git a/tests/unittests/test_handler/test_handler_growpart.py b/tests/unittests/test_handler/test_handler_growpart.py index 996526d3..f2ed4597 100644 --- a/tests/unittests/test_handler/test_handler_growpart.py +++ b/tests/unittests/test_handler/test_handler_growpart.py @@ -9,7 +9,6 @@ import errno import logging import os import re -import unittest # growpart: # mode: auto # off, on, auto, 'growpart' @@ -203,7 +202,7 @@ def simple_device_part_info(devpath): return x -class Bunch: +class Bunch(object): st_mode = None # fix pylint complaint def __init__(self, **kwds): -- cgit v1.2.3