diff options
author | Barry Warsaw <barry@python.org> | 2015-01-22 20:30:10 -0500 |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2015-01-22 20:30:10 -0500 |
commit | c0aae445119252134e8c89b3b73999ed213135f1 (patch) | |
tree | f4ca2238c25a97f242228c8d504c4af86f011046 /tests/unittests/test_distros | |
parent | 8329ad5bad5d6b0fcb8f4736fb308914ca3600c7 (diff) | |
download | vyos-cloud-init-c0aae445119252134e8c89b3b73999ed213135f1.tar.gz vyos-cloud-init-c0aae445119252134e8c89b3b73999ed213135f1.zip |
More conversions from mocker to mock.
Diffstat (limited to 'tests/unittests/test_distros')
-rw-r--r-- | tests/unittests/test_distros/test_resolv.py | 5 | ||||
-rw-r--r-- | tests/unittests/test_distros/test_sysconfig.py | 5 | ||||
-rw-r--r-- | tests/unittests/test_distros/test_user_data_normalize.py | 4 |
3 files changed, 6 insertions, 8 deletions
diff --git a/tests/unittests/test_distros/test_resolv.py b/tests/unittests/test_distros/test_resolv.py index 6b6ff6aa..779b83e3 100644 --- a/tests/unittests/test_distros/test_resolv.py +++ b/tests/unittests/test_distros/test_resolv.py @@ -1,8 +1,7 @@ -from mocker import MockerTestCase - from cloudinit.distros.parsers import resolv_conf import re +import unittest BASE_RESOLVE = ''' @@ -14,7 +13,7 @@ nameserver 10.15.30.92 BASE_RESOLVE = BASE_RESOLVE.strip() -class TestResolvHelper(MockerTestCase): +class TestResolvHelper(unittest.TestCase): def test_parse_same(self): rp = resolv_conf.ResolvConf(BASE_RESOLVE) rp_r = str(rp).strip() diff --git a/tests/unittests/test_distros/test_sysconfig.py b/tests/unittests/test_distros/test_sysconfig.py index 0c651407..f66201b3 100644 --- a/tests/unittests/test_distros/test_sysconfig.py +++ b/tests/unittests/test_distros/test_sysconfig.py @@ -1,6 +1,5 @@ -from mocker import MockerTestCase - import re +import unittest from cloudinit.distros.parsers.sys_conf import SysConf @@ -8,7 +7,7 @@ from cloudinit.distros.parsers.sys_conf import SysConf # Lots of good examples @ # http://content.hccfl.edu/pollock/AUnix1/SysconfigFilesDesc.txt -class TestSysConfHelper(MockerTestCase): +class TestSysConfHelper(unittest.TestCase): # This function was added in 2.7, make it work for 2.6 def assertRegMatches(self, text, regexp): regexp = re.compile(regexp) diff --git a/tests/unittests/test_distros/test_user_data_normalize.py b/tests/unittests/test_distros/test_user_data_normalize.py index 50398c74..b90d6185 100644 --- a/tests/unittests/test_distros/test_user_data_normalize.py +++ b/tests/unittests/test_distros/test_user_data_normalize.py @@ -1,4 +1,4 @@ -from mocker import MockerTestCase +import unittest from cloudinit import distros from cloudinit import helpers @@ -15,7 +15,7 @@ bcfg = { } -class TestUGNormalize(MockerTestCase): +class TestUGNormalize(unittest.TestCase): def _make_distro(self, dtype, def_user=None): cfg = dict(settings.CFG_BUILTIN) |