diff --git a/marconi/queues/transport/utils.py b/marconi/queues/transport/utils.py index c3cfc3428..81d5c744c 100644 --- a/marconi/queues/transport/utils.py +++ b/marconi/queues/transport/utils.py @@ -46,10 +46,10 @@ def read_json(stream, len): try: content = strutils.safe_decode(stream.read(len), 'utf-8') return json.loads(content, parse_int=_json_int) - except ValueError as ex: - raise MalformedJSON(ex) except UnicodeDecodeError as ex: raise MalformedJSON(ex) + except ValueError as ex: + raise MalformedJSON(ex) def to_json(obj): diff --git a/marconi/tests/functional/base.py b/marconi/tests/functional/base.py index 7e36e4c95..56bad3cb2 100644 --- a/marconi/tests/functional/base.py +++ b/marconi/tests/functional/base.py @@ -70,7 +70,6 @@ class FunctionalTestBase(testing.TestBase): # NOTE(flaper87): Use running instances. if self.cfg.marconi.run_server: if not (self.server and self.server.is_alive()): - # pylint: disable=not-callable self.server = self.server_class() self.server.start(self.mconf) diff --git a/marconi/tests/queues/storage/base.py b/marconi/tests/queues/storage/base.py index 9144b4b2c..3d620af9d 100644 --- a/marconi/tests/queues/storage/base.py +++ b/marconi/tests/queues/storage/base.py @@ -52,7 +52,6 @@ class ControllerBaseTest(testing.TestBase): oslo_cache.register_oslo_configs(self.conf) cache = oslo_cache.get_cache(self.conf.cache_url) - # pylint: disable=not-callable self.conf.register_opts(bootstrap._GENERAL_OPTIONS) pooling = 'pooling' in self.conf and self.conf.pooling if pooling and not self.control_driver_class: @@ -60,10 +59,8 @@ class ControllerBaseTest(testing.TestBase): "but control driver class is not specified") if not pooling: - # pylint: disable=not-callable self.driver = self.driver_class(self.conf, cache) else: - # pylint: disable=not-callable control = self.control_driver_class(self.conf, cache) uri = "sqlite:///:memory:" for i in range(4): @@ -75,10 +72,8 @@ class ControllerBaseTest(testing.TestBase): self.addCleanup(self._purge_databases) if not pooling: - # pylint: disable=not-callable self.controller = self.controller_class(self.driver) else: - # pylint: disable=not-callable self.controller = self.controller_class(self.driver._pool_catalog) def _prepare_conf(self): diff --git a/tests/functional/wsgi/v1/test_messages.py b/tests/functional/wsgi/v1/test_messages.py index dc095c3df..3cf3b752d 100644 --- a/tests/functional/wsgi/v1/test_messages.py +++ b/tests/functional/wsgi/v1/test_messages.py @@ -263,12 +263,12 @@ class TestMessages(base.V1FunctionalTestBase): test_message_bulk_insert_large_bodies.tags = ['positive'] @ddt.data(1, 10) - def test_message_bulk_insert_large_bodies(self, offset): + def test_message_bulk_insert_large_bodies_(self, offset): """Insert just under than max allowed messages.""" result = self._post_large_bulk_insert(offset) self.assertEqual(result.status_code, 400) - test_message_bulk_insert_large_bodies.tags = ['negative'] + test_message_bulk_insert_large_bodies_.tags = ['negative'] def test_message_bulk_insert_oversized(self): """Insert more than max allowed size.""" diff --git a/tests/functional/wsgi/v1_1/test_messages.py b/tests/functional/wsgi/v1_1/test_messages.py index fcce88426..e1b582960 100644 --- a/tests/functional/wsgi/v1_1/test_messages.py +++ b/tests/functional/wsgi/v1_1/test_messages.py @@ -326,12 +326,12 @@ class TestMessages(base.V1_1FunctionalTestBase): test_message_bulk_insert_large_bodies.tags = ['positive'] @ddt.data(1, 10) - def test_message_bulk_insert_large_bodies(self, offset): + def test_message_bulk_insert_large_bodies_(self, offset): """Insert just under than max allowed messages.""" result = self._post_large_bulk_insert(offset) self.assertEqual(result.status_code, 400) - test_message_bulk_insert_large_bodies.tags = ['negative'] + test_message_bulk_insert_large_bodies_.tags = ['negative'] def test_message_bulk_insert_oversized(self): """Insert more than max allowed size.""" diff --git a/tox.ini b/tox.ini index 4a055d205..13c151d95 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 1.6 -envlist = py26,py27,py33,pypy,pep8,lint2,lint3 +envlist = py26,py27,py33,pypy,pep8 skipsdist = True [testenv] @@ -26,16 +26,6 @@ downloadcache = ~/cache/pip [testenv:pep8] commands = flake8 -[testenv:lint2] -basepython = python2 -deps = pylint -commands = pylint ./marconi ./tests -E --ignore ./openstack - -[testenv:lint3] -basepython = python3 -deps = pylint -commands = pylint ./marconi ./tests -E --ignore ./openstack - [testenv:cover] setenv = NOSE_WITH_COVERAGE=1 commands =