summaryrefslogtreecommitdiff
path: root/cloudinit/tests/helpers.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2018-08-31 22:13:09 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2018-08-31 22:13:09 +0000
commit2d0ca72cde42f72babbce5823ea3bbf30a61021c (patch)
tree335acee66367a33891f6c07c144a23e44cb5c713 /cloudinit/tests/helpers.py
parent8d9d4c8477732c5cc559eb10ddacef4598f93591 (diff)
downloadvyos-cloud-init-2d0ca72cde42f72babbce5823ea3bbf30a61021c.tar.gz
vyos-cloud-init-2d0ca72cde42f72babbce5823ea3bbf30a61021c.zip
Fix the built-in cloudinit/tests/helpers:skipIf
this version uses unittest2 skipIf which is present in our python 2.6 environment.
Diffstat (limited to 'cloudinit/tests/helpers.py')
-rw-r--r--cloudinit/tests/helpers.py17
1 files changed, 1 insertions, 16 deletions
diff --git a/cloudinit/tests/helpers.py b/cloudinit/tests/helpers.py
index 5bfe7fa4..a022a7a0 100644
--- a/cloudinit/tests/helpers.py
+++ b/cloudinit/tests/helpers.py
@@ -10,7 +10,6 @@ import shutil
import sys
import tempfile
import time
-import unittest
import mock
import six
@@ -33,6 +32,7 @@ from cloudinit import util
# Used for skipping tests
SkipTest = unittest2.SkipTest
+skipIf = unittest2.skipIf
# Used for detecting different python versions
PY2 = False
@@ -426,21 +426,6 @@ def readResource(name, mode='r'):
try:
- skipIf = unittest.skipIf
-except AttributeError:
- # Python 2.6. Doesn't have to be high fidelity.
- def skipIf(condition, reason):
- def decorator(func):
- def wrapper(*args, **kws):
- if condition:
- return func(*args, **kws)
- else:
- print(reason, file=sys.stderr)
- return wrapper
- return decorator
-
-
-try:
import jsonschema
assert jsonschema # avoid pyflakes error F401: import unused
_missing_jsonschema_dep = False