diff options
author | Scott Moser <smoser@ubuntu.com> | 2016-06-20 22:38:26 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2016-06-20 22:38:26 -0400 |
commit | b0ea6e5a2c1c26b8faf1dc8303feebb00344e537 (patch) | |
tree | 1ec50e5f8c07ab1c7b4e206a5d0c7dca0858b640 /tests/unittests/test__init__.py | |
parent | fe6919dcd37c6c1ecd371e5eb20b605ab20a6420 (diff) | |
parent | 776b0cfe847f531d8d5a235f52673c3da1f06064 (diff) | |
download | vyos-cloud-init-b0ea6e5a2c1c26b8faf1dc8303feebb00344e537.tar.gz vyos-cloud-init-b0ea6e5a2c1c26b8faf1dc8303feebb00344e537.zip |
merge with trunk.
test runs to the point where it did, think I got most of the changes
incorporated.
Diffstat (limited to 'tests/unittests/test__init__.py')
-rw-r--r-- | tests/unittests/test__init__.py | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/tests/unittests/test__init__.py b/tests/unittests/test__init__.py index 153f1658..0154784a 100644 --- a/tests/unittests/test__init__.py +++ b/tests/unittests/test__init__.py @@ -1,16 +1,6 @@ import os import shutil import tempfile -import unittest - -try: - from unittest import mock -except ImportError: - import mock -try: - from contextlib import ExitStack -except ImportError: - from contextlib2 import ExitStack from cloudinit import handlers from cloudinit import helpers @@ -18,7 +8,7 @@ from cloudinit import settings from cloudinit import url_helper from cloudinit import util -from .helpers import TestCase +from .helpers import TestCase, ExitStack, mock class FakeModule(handlers.Handler): @@ -99,9 +89,10 @@ class TestWalkerHandleHandler(TestCase): self.assertEqual(self.data['handlercount'], 0) -class TestHandlerHandlePart(unittest.TestCase): +class TestHandlerHandlePart(TestCase): def setUp(self): + super(TestHandlerHandlePart, self).setUp() self.data = "fake data" self.ctype = "fake ctype" self.filename = "fake filename" @@ -177,7 +168,7 @@ class TestHandlerHandlePart(unittest.TestCase): self.data, self.ctype, self.filename, self.payload) -class TestCmdlineUrl(unittest.TestCase): +class TestCmdlineUrl(TestCase): def test_invalid_content(self): url = "http://example.com/foo" key = "mykey" |