summaryrefslogtreecommitdiff
path: root/tests/unittests/test_datasource/test_nocloud.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2016-05-19 14:26:30 -0700
committerJoshua Harlow <harlowja@gmail.com>2016-05-19 14:26:30 -0700
commit6b97c4e462b19374d6af807b1f5b9c087aa97996 (patch)
tree3628a55f69b61644a519d5df40398d55ba55186c /tests/unittests/test_datasource/test_nocloud.py
parentea4bc2c603a9d964a918e01d00e39a851e979830 (diff)
parent880d9fc2f9c62abf19b1506595aa81e5417dea45 (diff)
downloadvyos-cloud-init-6b97c4e462b19374d6af807b1f5b9c087aa97996.tar.gz
vyos-cloud-init-6b97c4e462b19374d6af807b1f5b9c087aa97996.zip
Remerge against head/master
Diffstat (limited to 'tests/unittests/test_datasource/test_nocloud.py')
-rw-r--r--tests/unittests/test_datasource/test_nocloud.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/tests/unittests/test_datasource/test_nocloud.py b/tests/unittests/test_datasource/test_nocloud.py
index 3c528c23..077603b4 100644
--- a/tests/unittests/test_datasource/test_nocloud.py
+++ b/tests/unittests/test_datasource/test_nocloud.py
@@ -1,22 +1,11 @@
from cloudinit import helpers
from cloudinit.sources import DataSourceNoCloud
from cloudinit import util
-from ..helpers import TestCase, populate_dir
+from ..helpers import TestCase, populate_dir, mock, ExitStack
import os
import shutil
import tempfile
-import unittest
-import yaml
-
-try:
- from unittest import mock
-except ImportError:
- import mock
-try:
- from contextlib import ExitStack
-except ImportError:
- from contextlib2 import ExitStack
class TestNoCloudDataSource(TestCase):
@@ -139,7 +128,7 @@ class TestNoCloudDataSource(TestCase):
self.assertTrue(ret)
-class TestParseCommandLineData(unittest.TestCase):
+class TestParseCommandLineData(TestCase):
def test_parse_cmdline_data_valid(self):
ds_id = "ds=nocloud"