diff options
author | Barry Warsaw <barry@python.org> | 2015-01-22 14:46:21 -0500 |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2015-01-22 14:46:21 -0500 |
commit | 9a16a6a2e9929098474e0db23db130cf172aeba4 (patch) | |
tree | 8807a5958b5f8ebe29643787cf29ef5f99d2700e /tests/unittests/test_cs_util.py | |
parent | 6363b546c8bacb24b9350d108165a09bb65828a1 (diff) | |
download | vyos-cloud-init-9a16a6a2e9929098474e0db23db130cf172aeba4.tar.gz vyos-cloud-init-9a16a6a2e9929098474e0db23db130cf172aeba4.zip |
Use .addCleanup() instead of a .tearDown() where appropriate, although we
might have to rewrite this for Python 2.6.
Disable Cepko tests (test_cs_util.py) since they are essentially worthless.
Convert test_azure to unittest.mock.
Diffstat (limited to 'tests/unittests/test_cs_util.py')
-rw-r--r-- | tests/unittests/test_cs_util.py | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/tests/unittests/test_cs_util.py b/tests/unittests/test_cs_util.py index 7d59222b..99fac84d 100644 --- a/tests/unittests/test_cs_util.py +++ b/tests/unittests/test_cs_util.py @@ -1,4 +1,4 @@ -from mocker import MockerTestCase +import unittest from cloudinit.cs_utils import Cepko @@ -26,16 +26,21 @@ class CepkoMock(Cepko): return SERVER_CONTEXT['tags'] -class CepkoResultTests(MockerTestCase): +# 2015-01-22 BAW: This test is completely useless because it only ever tests +# the CepkoMock object. Even in its original form, I don't think it ever +# touched the underlying Cepko class methods. +@unittest.skip('This test is completely useless') +class CepkoResultTests(unittest.TestCase): def setUp(self): - self.mocked = self.mocker.replace("cloudinit.cs_utils.Cepko", - spec=CepkoMock, - count=False, - passthrough=False) - self.mocked() - self.mocker.result(CepkoMock()) - self.mocker.replay() - self.c = Cepko() + pass + ## self.mocked = self.mocker.replace("cloudinit.cs_utils.Cepko", + ## spec=CepkoMock, + ## count=False, + ## passthrough=False) + ## self.mocked() + ## self.mocker.result(CepkoMock()) + ## self.mocker.replay() + ## self.c = Cepko() def test_getitem(self): result = self.c.all() |