summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/unittests/test_datasource/test_digitalocean.py6
-rw-r--r--tox.ini27
2 files changed, 29 insertions, 4 deletions
diff --git a/tests/unittests/test_datasource/test_digitalocean.py b/tests/unittests/test_datasource/test_digitalocean.py
index bdfe0ba2..7bde0820 100644
--- a/tests/unittests/test_datasource/test_digitalocean.py
+++ b/tests/unittests/test_datasource/test_digitalocean.py
@@ -162,7 +162,7 @@ class TestDataSourceDigitalOcean(TestCase):
m_read_sysinfo.return_value = (False, None)
ds = self.get_ds(get_sysinfo=None)
self.assertEqual(False, ds.get_data())
- m_read_sysinfo.assert_called()
+ self.assertTrue(m_read_sysinfo.called)
@mock.patch('cloudinit.sources.helpers.digitalocean.read_metadata')
def test_metadata(self, mock_readmd):
@@ -172,7 +172,7 @@ class TestDataSourceDigitalOcean(TestCase):
ret = ds.get_data()
self.assertTrue(ret)
- mock_readmd.assert_called()
+ self.assertTrue(mock_readmd.called)
self.assertEqual(DO_META.get('user_data'), ds.get_userdata_raw())
self.assertEqual(DO_META.get('vendor_data'), ds.get_vendordata_raw())
@@ -196,7 +196,7 @@ class TestDataSourceDigitalOcean(TestCase):
ret = ds.get_data()
self.assertTrue(ret)
- mock_readmd.assert_called()
+ self.assertTrue(mock_readmd.called)
# Multiple keys
self.assertEqual(metadata['public_keys'], ds.get_public_ssh_keys())
diff --git a/tox.ini b/tox.ini
index 9424ae51..729de2a6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist = py27,py3,flake8
+envlist = py27, py3, flake8, xenial
recreate = True
[testenv]
@@ -34,3 +34,28 @@ basepython = python3
deps = {[testenv]deps}
sphinx
commands = {envpython} -m sphinx {posargs:doc/rtd doc/rtd_html}
+
+[testenv:xenial]
+basepython = python3
+deps =
+ # requirements
+ jinja2==2.8
+ pyyaml==3.11
+ PrettyTable==0.7.2
+ oauthlib==1.0.3
+ pyserial==3.0.1
+ configobj==5.0.6
+ requests==2.9.1
+ # jsonpatch ubuntu is 1.10, not 1.19 (#839779)
+ jsonpatch==1.10
+ six==1.10.0
+ # test-requirements
+ httpretty==0.8.6
+ mock==1.3.0
+ nose==1.3.7
+ unittest2==1.1.0
+ contextlib2==0.5.1
+ pep8==1.7.0
+ pyflakes==1.1.0
+ flake8==2.5.4
+ hacking==0.10.2