summaryrefslogtreecommitdiff
path: root/tests/unittests/test_cs_util.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2016-04-04 12:07:19 -0400
committerScott Moser <smoser@ubuntu.com>2016-04-04 12:07:19 -0400
commit7d8a3194552387fa9e21216bcd9a3bfc76fa2b04 (patch)
treec8dc45b013208a4e5e09e6ade63b3b5994f80aa3 /tests/unittests/test_cs_util.py
parent93f5af9f5075a416c65c1d0350c374e16f32f0d5 (diff)
parent210b041b2fead7a57af91f60a6f89d9e5aa1ed4a (diff)
downloadvyos-cloud-init-7d8a3194552387fa9e21216bcd9a3bfc76fa2b04.tar.gz
vyos-cloud-init-7d8a3194552387fa9e21216bcd9a3bfc76fa2b04.zip
merge with trunk
Diffstat (limited to 'tests/unittests/test_cs_util.py')
-rw-r--r--tests/unittests/test_cs_util.py39
1 files changed, 29 insertions, 10 deletions
diff --git a/tests/unittests/test_cs_util.py b/tests/unittests/test_cs_util.py
index 7d59222b..d7273035 100644
--- a/tests/unittests/test_cs_util.py
+++ b/tests/unittests/test_cs_util.py
@@ -1,7 +1,21 @@
-from mocker import MockerTestCase
+from __future__ import print_function
+
+import sys
+import unittest
from cloudinit.cs_utils import Cepko
+try:
+ skip = unittest.skip
+except AttributeError:
+ # Python 2.6. Doesn't have to be high fidelity.
+ def skip(reason):
+ def decorator(func):
+ def wrapper(*args, **kws):
+ print(reason, file=sys.stderr)
+ return wrapper
+ return decorator
+
SERVER_CONTEXT = {
"cpu": 1000,
@@ -26,16 +40,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.
+@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()