diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-03-08 14:21:48 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-03-08 14:21:48 -0500 |
commit | 82a92493a08cf311ec6df6170ed7e31f2b1ce1ea (patch) | |
tree | d625fd27893f2b39c6d937afede1e0302ec99eb4 /tests/unittests/test_datasource | |
parent | 61011d088ca011c2bc3a9f519519a833064cc922 (diff) | |
download | vyos-cloud-init-82a92493a08cf311ec6df6170ed7e31f2b1ce1ea.tar.gz vyos-cloud-init-82a92493a08cf311ec6df6170ed7e31f2b1ce1ea.zip |
pep8 and pylint
Diffstat (limited to 'tests/unittests/test_datasource')
-rw-r--r-- | tests/unittests/test_datasource/test_maas.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/unittests/test_datasource/test_maas.py b/tests/unittests/test_datasource/test_maas.py index 3da2b0b3..d0e121d6 100644 --- a/tests/unittests/test_datasource/test_maas.py +++ b/tests/unittests/test_datasource/test_maas.py @@ -1,8 +1,6 @@ -from unittest import TestCase from tempfile import mkdtemp from shutil import rmtree import os -import urllib2 from StringIO import StringIO from copy import copy from cloudinit.DataSourceMaaS import ( @@ -29,7 +27,8 @@ class TestMaasDataSource(MockerTestCase): def test_seed_dir_valid(self): """Verify a valid seeddir is read as such""" - data = {'instance-id': 'i-valid01', 'local-hostname': 'valid01-hostname', + data = {'instance-id': 'i-valid01', + 'local-hostname': 'valid01-hostname', 'user-data': 'valid01-userdata'} my_d = os.path.join(self.tmp, "valid") @@ -99,7 +98,8 @@ class TestMaasDataSource(MockerTestCase): def test_seed_url_valid(self): """Verify that valid seed_url is read as such""" valid = {'meta-data/instance-id': 'i-instanceid', - 'meta-data/local-hostname': 'test-hostname', 'user-data': 'foodata'} + 'meta-data/local-hostname': 'test-hostname', + 'user-data': 'foodata'} my_seed = "http://example.com/xmeta" my_ver = "1999-99-99" @@ -108,8 +108,10 @@ class TestMaasDataSource(MockerTestCase): def my_headers_cb(url): return(my_headers) - mock_request = self.mocker.replace("urllib2.Request", passthrough=False) - mock_urlopen = self.mocker.replace("urllib2.urlopen", passthrough=False) + mock_request = self.mocker.replace("urllib2.Request", + passthrough=False) + mock_urlopen = self.mocker.replace("urllib2.urlopen", + passthrough=False) for (key, val) in valid.iteritems(): mock_request("%s/%s/%s" % (my_seed, my_ver, key), |