summaryrefslogtreecommitdiff
path: root/tests/unittests/test_datasource
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2014-01-24 22:31:28 -0500
committerScott Moser <smoser@ubuntu.com>2014-01-24 22:31:28 -0500
commit0be4922d92e874b2e3300bdde65829cdb6569524 (patch)
treede85c8d5e002377023668b5b3b8c2525be652389 /tests/unittests/test_datasource
parent15ebe2a01c0bcdaae43054e0e3559871a99f72aa (diff)
downloadvyos-cloud-init-0be4922d92e874b2e3300bdde65829cdb6569524.tar.gz
vyos-cloud-init-0be4922d92e874b2e3300bdde65829cdb6569524.zip
read_file_or_url: raise UrlError with 404 on ENOENT
This makes it easier to call read_file_or_url and handle file or url errors. Now read_file_or_url will raise a UrlError in either case on errors.
Diffstat (limited to 'tests/unittests/test_datasource')
-rw-r--r--tests/unittests/test_datasource/test_maas.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/unittests/test_datasource/test_maas.py b/tests/unittests/test_datasource/test_maas.py
index ebfb24da..bd5d23fd 100644
--- a/tests/unittests/test_datasource/test_maas.py
+++ b/tests/unittests/test_datasource/test_maas.py
@@ -122,7 +122,7 @@ class TestMAASDataSource(mocker.MockerTestCase):
headers_cb=my_headers_cb,
exception_cb=mocker.ANY)
resp = valid.get(key)
- self.mocker.result(util.StringResponse(resp))
+ self.mocker.result(url_helper.StringResponse(resp))
self.mocker.replay()
(userdata, metadata) = DataSourceMAAS.read_maas_seed_url(my_seed,