diff --git a/glance/tests/unit/common/test_exception.py b/glance/tests/unit/common/test_exception.py index 33e7df9d9a..5681432c83 100644 --- a/glance/tests/unit/common/test_exception.py +++ b/glance/tests/unit/common/test_exception.py @@ -39,13 +39,13 @@ class GlanceExceptionTestCase(test_utils.BaseTestCase): class FakeGlanceException(exception.GlanceException): message = "default message: %(code)s" - exc = FakeGlanceException(code=http.INTERNAL_SERVER_ERROR) + exc = FakeGlanceException(code=int(http.INTERNAL_SERVER_ERROR)) self.assertEqual("default message: 500", encodeutils.exception_to_unicode(exc)) def test_specified_error_msg_with_kwargs(self): msg = exception.GlanceException('test: %(code)s', - code=http.INTERNAL_SERVER_ERROR) + code=int(http.INTERNAL_SERVER_ERROR)) self.assertIn('test: 500', encodeutils.exception_to_unicode(msg)) def test_non_unicode_error_msg(self): diff --git a/glance/tests/unit/v1/test_api.py b/glance/tests/unit/v1/test_api.py index a51ae8675a..8f95206412 100644 --- a/glance/tests/unit/v1/test_api.py +++ b/glance/tests/unit/v1/test_api.py @@ -833,7 +833,7 @@ class TestGlanceAPI(base.IsolatedUnitTest): self.assertEqual(http_client.REQUEST_ENTITY_TOO_LARGE, res.status_int) def test_add_image_size_data_exceed_quota(self): - quota = http_client.INTERNAL_SERVER_ERROR + quota = 500 self.config(user_storage_quota=str(quota)) fixture_headers = { 'x-image-meta-name': 'fake image #3', diff --git a/tox.ini b/tox.ini index 5f0f132f7b..f396bd4f01 100644 --- a/tox.ini +++ b/tox.ini @@ -1,14 +1,12 @@ [tox] minversion = 2.3.1 -envlist = py34,py27,pep8 +envlist = py35,py27,pep8 skipsdist = True [testenv] basepython = - python2.7 - debug-py27: python2.7 - py34: python3.4 - debug-py34: python3.4 + {py27,debug-py27,debug,venv,cover,docs,bandit,pep8,api-ref,genconfig,releasenotes}: python2.7 + {py35,debug-py35}: python3.5 setenv = VIRTUAL_ENV={envdir} PYTHONWARNINGS=default::DeprecationWarning @@ -19,7 +17,7 @@ commands = bandit: bandit -c bandit.yaml -r glance -n5 -p gate cover: python setup.py testr --coverage --testr-args='^(?!.*test.*coverage).*$' debug: oslo_debug_helper {posargs} - debug{-py27,-py34}: oslo_debug_helper {posargs} + debug{-py27,-py35}: oslo_debug_helper {posargs} docs: python setup.py build_sphinx py27: ostestr --slowest {posargs} releasenotes: sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html @@ -27,7 +25,7 @@ commands = whitelist_externals = bash passenv = *_proxy *_PROXY -[testenv:py34] +[testenv:py35] commands = lockutils-wrapper python setup.py testr --slowest --testr-args='glance.tests.unit' python -m testtools.run \