summaryrefslogtreecommitdiff
path: root/tests/unittests/test_datasource/test_azure.py
diff options
context:
space:
mode:
authorDaniel Watkins <daniel.watkins@canonical.com>2015-05-08 16:22:36 +0100
committerDaniel Watkins <daniel.watkins@canonical.com>2015-05-08 16:22:36 +0100
commit1185aeae80fc8279946069bb8eec492b3cb81556 (patch)
tree40c303d2a0f2c5cbe07b8f66a31dcbba252e1219 /tests/unittests/test_datasource/test_azure.py
parent84868622c404cda5efd2a753e2de30c1afca49a2 (diff)
downloadvyos-cloud-init-1185aeae80fc8279946069bb8eec492b3cb81556.tar.gz
vyos-cloud-init-1185aeae80fc8279946069bb8eec492b3cb81556.zip
Reintroduce original code path.
Diffstat (limited to 'tests/unittests/test_datasource/test_azure.py')
-rw-r--r--tests/unittests/test_datasource/test_azure.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unittests/test_datasource/test_azure.py b/tests/unittests/test_datasource/test_azure.py
index 983be4cd..c72dc801 100644
--- a/tests/unittests/test_datasource/test_azure.py
+++ b/tests/unittests/test_datasource/test_azure.py
@@ -389,11 +389,13 @@ class TestAzureDataSource(TestCase):
def test_exception_fetching_fabric_data_doesnt_propagate(self):
ds = self._get_ds({'ovfcontent': construct_valid_ovf_env()})
+ ds.ds_cfg['agent_command'] = '__builtin__'
self.get_metadata_from_fabric.side_effect = Exception
self.assertFalse(ds.get_data())
def test_fabric_data_included_in_metadata(self):
ds = self._get_ds({'ovfcontent': construct_valid_ovf_env()})
+ ds.ds_cfg['agent_command'] = '__builtin__'
self.get_metadata_from_fabric.return_value = {'test': 'value'}
ret = ds.get_data()
self.assertTrue(ret)
@@ -419,6 +421,9 @@ class TestAzureBounce(TestCase):
self.patches.enter_context(
mock.patch.object(DataSourceAzure, 'find_ephemeral_part',
mock.MagicMock(return_value=None)))
+ self.patches.enter_context(
+ mock.patch.object(DataSourceAzure, 'get_metadata_from_fabric',
+ mock.MagicMock(return_value={})))
def setUp(self):
super(TestAzureBounce, self).setUp()