summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.zuul.yaml10
-rw-r--r--README.rst2
-rw-r--r--glanceclient/tests/unit/test_shell.py16
-rw-r--r--glanceclient/v2/images.py2
-rw-r--r--tox.ini5
5 files changed, 25 insertions, 10 deletions
diff --git a/.zuul.yaml b/.zuul.yaml
index 9d8a050..a8f7330 100644
--- a/.zuul.yaml
+++ b/.zuul.yaml
@@ -114,6 +114,13 @@
vars:
tox_envlist: py35
+- job:
+ name: glanceclient-dsvm-functional-py3
+ parent: glanceclient-dsvm-functional
+ vars:
+ devstack_localrc:
+ USE_PYTHON3: true
+
- project:
check:
jobs:
@@ -131,3 +138,6 @@
- glanceclient-tox-py35-keystone-tips
- glanceclient-tox-py27-oslo-tips
- glanceclient-tox-py35-oslo-tips
+ experimental:
+ jobs:
+ - glanceclient-dsvm-functional-py3
diff --git a/README.rst b/README.rst
index 4404e40..c290659 100644
--- a/README.rst
+++ b/README.rst
@@ -49,4 +49,4 @@ See release notes and more at `<http://docs.openstack.org/python-glanceclient/>`
.. _Source: https://git.openstack.org/cgit/openstack/python-glanceclient
.. _How to Contribute: https://docs.openstack.org/infra/manual/developers.html
.. _Specs: https://specs.openstack.org/openstack/glance-specs/
-
+.. _Release notes: https://docs.openstack.org/releasenotes/python-glanceclient
diff --git a/glanceclient/tests/unit/test_shell.py b/glanceclient/tests/unit/test_shell.py
index ce2fec3..0f15007 100644
--- a/glanceclient/tests/unit/test_shell.py
+++ b/glanceclient/tests/unit/test_shell.py
@@ -799,10 +799,10 @@ class ShellCacheSchemaTest(testutils.TestCase):
open.mock_calls[0])
self.assertEqual(mock.call(self.cache_files[1], 'w'),
open.mock_calls[4])
- self.assertEqual(mock.call().write(json.dumps(schema_odict)),
- open.mock_calls[2])
- self.assertEqual(mock.call().write(json.dumps(schema_odict)),
- open.mock_calls[6])
+ actual = json.loads(open.mock_calls[2][1][0])
+ self.assertEqual(schema_odict, actual)
+ actual = json.loads(open.mock_calls[6][1][0])
+ self.assertEqual(schema_odict, actual)
@mock.patch('six.moves.builtins.open', new=mock.mock_open(), create=True)
@mock.patch('os.path.exists', side_effect=[True, False, False, False])
@@ -822,10 +822,10 @@ class ShellCacheSchemaTest(testutils.TestCase):
open.mock_calls[0])
self.assertEqual(mock.call(self.cache_files[1], 'w'),
open.mock_calls[4])
- self.assertEqual(mock.call().write(json.dumps(schema_odict)),
- open.mock_calls[2])
- self.assertEqual(mock.call().write(json.dumps(schema_odict)),
- open.mock_calls[6])
+ actual = json.loads(open.mock_calls[2][1][0])
+ self.assertEqual(schema_odict, actual)
+ actual = json.loads(open.mock_calls[6][1][0])
+ self.assertEqual(schema_odict, actual)
@mock.patch('six.moves.builtins.open', new=mock.mock_open(), create=True)
@mock.patch('os.path.exists', return_value=True)
diff --git a/glanceclient/v2/images.py b/glanceclient/v2/images.py
index 89aa912..fbb67a9 100644
--- a/glanceclient/v2/images.py
+++ b/glanceclient/v2/images.py
@@ -125,7 +125,7 @@ class Controller(object):
if limit:
limit -= 1
if limit <= 0:
- raise StopIteration
+ return
try:
next_url = body['next']
diff --git a/tox.ini b/tox.ini
index f6220e4..85f5f3a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -17,9 +17,11 @@ deps =
commands = stestr run --slowest {posargs}
[testenv:pep8]
+basepython = python3
commands = flake8
[testenv:venv]
+basepython = python3
commands = {posargs}
[pbr]
@@ -50,6 +52,7 @@ commands =
stestr run --slowest {posargs}
[testenv:cover]
+basepython = python3
setenv =
PYTHON=coverage run --source glanceclient --parallel-mode
commands =
@@ -59,11 +62,13 @@ commands =
coverage xml -o cover/coverage.xml
[testenv:docs]
+basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -W -b html doc/source doc/build/html
[testenv:releasenotes]
+basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html