summaryrefslogtreecommitdiff
path: root/tests/unittests/test_datasource/test_gce.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unittests/test_datasource/test_gce.py')
-rw-r--r--tests/unittests/test_datasource/test_gce.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/unittests/test_datasource/test_gce.py b/tests/unittests/test_datasource/test_gce.py
index 6fd1341d..3e8398b3 100644
--- a/tests/unittests/test_datasource/test_gce.py
+++ b/tests/unittests/test_datasource/test_gce.py
@@ -163,8 +163,9 @@ class TestDataSourceGCE(test_helpers.HttprettyTestCase):
self.assertEqual(True, r)
self.assertEqual('bar', self.ds.availability_zone)
- def test_get_data_returns_false_if_not_on_gce(self):
- self.m_platform_reports_gce.return_value = False
+ @mock.patch('cloudinit.sources.DataSourceGCE.platform_reports_gce')
+ def test_get_data_returns_false_if_not_on_gce(self, m_platform_gce):
+ m_platform_gce.return_value = False
self.assertEqual(False, self.ds.get_data())