diff options
author | harlowja <harlowja@virtualbox.rhel> | 2013-02-23 21:23:24 -0800 |
---|---|---|
committer | harlowja <harlowja@virtualbox.rhel> | 2013-02-23 21:23:24 -0800 |
commit | eacfc7ffbec3e6a0348ed484da895e2d2fc5ba10 (patch) | |
tree | e63c8f74a34c6250764136865c542af6ba78d989 /tests/unittests/test_datasource/test_maas.py | |
parent | 46a7a39775ed8f745ec8b63a9563f3ae6337d845 (diff) | |
download | vyos-cloud-init-eacfc7ffbec3e6a0348ed484da895e2d2fc5ba10.tar.gz vyos-cloud-init-eacfc7ffbec3e6a0348ed484da895e2d2fc5ba10.zip |
Get tests working and further adjustments.
Diffstat (limited to 'tests/unittests/test_datasource/test_maas.py')
-rw-r--r-- | tests/unittests/test_datasource/test_maas.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/unittests/test_datasource/test_maas.py b/tests/unittests/test_datasource/test_maas.py index b56fea82..47f8caa4 100644 --- a/tests/unittests/test_datasource/test_maas.py +++ b/tests/unittests/test_datasource/test_maas.py @@ -3,12 +3,13 @@ import os from cloudinit.sources import DataSourceMAAS from cloudinit import url_helper +from cloudinit import util from tests.unittests.helpers import populate_dir -from mocker import MockerTestCase +import mocker -class TestMAASDataSource(MockerTestCase): +class TestMAASDataSource(mocker.MockerTestCase): def setUp(self): super(TestMAASDataSource, self).setUp() @@ -115,9 +116,11 @@ class TestMAASDataSource(MockerTestCase): for key in valid_order: url = "%s/%s/%s" % (my_seed, my_ver, key) - mock_request(url, headers=my_headers, timeout=None) + mock_request(url, headers=my_headers, timeout=mocker.ANY, + data=mocker.ANY, sec_between=mocker.ANY, + ssl_details=mocker.ANY, retries=mocker.ANY) resp = valid.get(key) - self.mocker.result(url_helper.UrlResponse(200, resp)) + self.mocker.result(util.StringResponse(resp)) self.mocker.replay() (userdata, metadata) = DataSourceMAAS.read_maas_seed_url(my_seed, |