summaryrefslogtreecommitdiff
path: root/tests/unittests/test_datasource/test_digitalocean.py
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2015-01-22 21:21:04 -0500
committerBarry Warsaw <barry@python.org>2015-01-22 21:21:04 -0500
commit3b798b5d5c3caa5d0e8e534855e29010ca932aaa (patch)
treec517762e79e4421d9b5a1be74cfe5776a7b9427a /tests/unittests/test_datasource/test_digitalocean.py
parent6f2a62c2fde85839ed437549597498a707f5da68 (diff)
downloadvyos-cloud-init-3b798b5d5c3caa5d0e8e534855e29010ca932aaa.tar.gz
vyos-cloud-init-3b798b5d5c3caa5d0e8e534855e29010ca932aaa.zip
Low hanging Python 3 fruit.
Diffstat (limited to 'tests/unittests/test_datasource/test_digitalocean.py')
-rw-r--r--tests/unittests/test_datasource/test_digitalocean.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/unittests/test_datasource/test_digitalocean.py b/tests/unittests/test_datasource/test_digitalocean.py
index d1270fc2..98f9cfac 100644
--- a/tests/unittests/test_datasource/test_digitalocean.py
+++ b/tests/unittests/test_datasource/test_digitalocean.py
@@ -18,8 +18,7 @@
import httpretty
import re
-from types import ListType
-from urlparse import urlparse
+from six.moves.urllib_parse import urlparse
from cloudinit import settings
from cloudinit import helpers
@@ -110,7 +109,7 @@ class TestDataSourceDigitalOcean(test_helpers.HttprettyTestCase):
self.assertEqual([DO_META.get('public-keys')],
self.ds.get_public_ssh_keys())
- self.assertIs(type(self.ds.get_public_ssh_keys()), ListType)
+ self.assertIsInstance(self.ds.get_public_ssh_keys(), list)
@httpretty.activate
def test_multiple_ssh_keys(self):
@@ -124,4 +123,4 @@ class TestDataSourceDigitalOcean(test_helpers.HttprettyTestCase):
self.assertEqual(DO_META.get('public-keys').splitlines(),
self.ds.get_public_ssh_keys())
- self.assertIs(type(self.ds.get_public_ssh_keys()), ListType)
+ self.assertIsInstance(self.ds.get_public_ssh_keys(), list)