summaryrefslogtreecommitdiff
path: root/tests/unittests/test_datasource/test_altcloud.py
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2017-05-24 21:33:30 -0400
committerScott Moser <smoser@brickies.net>2017-05-25 09:33:25 -0400
commite5b2c011440aefe036c71a8c5e8ec547cc80f270 (patch)
tree566b817a5889775b81cf33420027a8bca237db23 /tests/unittests/test_datasource/test_altcloud.py
parent9e01cca6a90a30e1b8cf454467c002b40f22dff9 (diff)
downloadvyos-cloud-init-e5b2c011440aefe036c71a8c5e8ec547cc80f270.tar.gz
vyos-cloud-init-e5b2c011440aefe036c71a8c5e8ec547cc80f270.zip
python2.6: fix unit tests usage of assertNone and format.
python2.6 unittest.TestCase does not have the assertIsNone or assertIsNotNone. We just have to explicitly use the unittest2 version, which we get from helpers. The desire to use assertIsNone comes from flake8 (through hacking, I believe). Also, fix "{}.format('foo')" which is not valid in python2.6.
Diffstat (limited to 'tests/unittests/test_datasource/test_altcloud.py')
-rw-r--r--tests/unittests/test_datasource/test_altcloud.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/unittests/test_datasource/test_altcloud.py b/tests/unittests/test_datasource/test_altcloud.py
index b6d4a453..9c46abc1 100644
--- a/tests/unittests/test_datasource/test_altcloud.py
+++ b/tests/unittests/test_datasource/test_altcloud.py
@@ -17,7 +17,8 @@ import tempfile
from cloudinit import helpers
from cloudinit import util
-from unittest import TestCase
+
+from ..helpers import TestCase
import cloudinit.sources.DataSourceAltCloud as dsac