summaryrefslogtreecommitdiff
path: root/nova/tests/unit/test_hacking.py
diff options
context:
space:
mode:
Diffstat (limited to 'nova/tests/unit/test_hacking.py')
-rw-r--r--nova/tests/unit/test_hacking.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/nova/tests/unit/test_hacking.py b/nova/tests/unit/test_hacking.py
index 03b7692217..e5a6efb0ad 100644
--- a/nova/tests/unit/test_hacking.py
+++ b/nova/tests/unit/test_hacking.py
@@ -1020,3 +1020,13 @@ class HackingTestCase(test.NoDBTestCase):
nova_utils.ReaderWriterLock()
"""
self._assert_has_no_errors(code, checks.check_lockutils_rwlocks)
+
+ def test_check_six(self):
+ code = """
+ import six
+ from six import moves
+ from six.moves import range
+ import six.moves.urllib.parse as urlparse
+ """
+ errors = [(x + 1, 0, 'N370') for x in range(4)]
+ self._assert_has_errors(code, checks.check_six, expected_errors=errors)