diff options
author | Joshua Harlow <harlowja@gmail.com> | 2016-05-19 14:26:30 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@gmail.com> | 2016-05-19 14:26:30 -0700 |
commit | 6b97c4e462b19374d6af807b1f5b9c087aa97996 (patch) | |
tree | 3628a55f69b61644a519d5df40398d55ba55186c /tests/unittests/test_datasource/test_smartos.py | |
parent | ea4bc2c603a9d964a918e01d00e39a851e979830 (diff) | |
parent | 880d9fc2f9c62abf19b1506595aa81e5417dea45 (diff) | |
download | vyos-cloud-init-6b97c4e462b19374d6af807b1f5b9c087aa97996.tar.gz vyos-cloud-init-6b97c4e462b19374d6af807b1f5b9c087aa97996.zip |
Remerge against head/master
Diffstat (limited to 'tests/unittests/test_datasource/test_smartos.py')
-rw-r--r-- | tests/unittests/test_datasource/test_smartos.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/unittests/test_datasource/test_smartos.py b/tests/unittests/test_datasource/test_smartos.py index cdd04a72..2f159ac4 100644 --- a/tests/unittests/test_datasource/test_smartos.py +++ b/tests/unittests/test_datasource/test_smartos.py @@ -33,19 +33,16 @@ import stat import tempfile import uuid -import serial +from cloudinit import serial +from cloudinit.sources import DataSourceSmartOS + import six from cloudinit import helpers as c_helpers -from cloudinit.sources import DataSourceSmartOS from cloudinit.util import b64e from .. import helpers - -try: - from unittest import mock -except ImportError: - import mock +from ..helpers import mock, SkipTest MOCK_RETURNS = { 'hostname': 'test-host', @@ -445,6 +442,7 @@ class TestJoyentMetadataClient(helpers.FilesystemMockingTestCase): def setUp(self): super(TestJoyentMetadataClient, self).setUp() + self.serial = mock.MagicMock(spec=serial.Serial) self.request_id = 0xabcdef12 self.metadata_value = 'value' |