From 05623ba613fee0d196c2ca35ef818c21af868e2f Mon Sep 17 00:00:00 2001 From: zhanggang Date: Tue, 11 Apr 2017 02:25:18 -0400 Subject: [PATCH] Missing import of 'assert_equal' in tests/util/__init__.py trove/tests/util/__init__.py makes a reference to assert_equal in method assert_http_code, however assert_equal has not been imported. The method was re-implemented in trove/test/util/client.py, so just remove it. Change-Id: Iec1eae829376c992e4a0c9d06f28d3c544860a86 Closes-Bug: 1681311 --- trove/tests/util/__init__.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/trove/tests/util/__init__.py b/trove/tests/util/__init__.py index a8d640687b..692b97831d 100644 --- a/trove/tests/util/__init__.py +++ b/trove/tests/util/__init__.py @@ -35,7 +35,6 @@ from proboscis import SkipTest from six.moves.urllib.parse import unquote from sqlalchemy import create_engine from troveclient.compat import Dbaas -from troveclient.compat import exceptions from trove.common import cfg from trove.common.utils import import_class @@ -50,23 +49,6 @@ WHITE_BOX = test_config.white_box CONF = cfg.CONF -def assert_http_code(expected_http_code, func, *args, **kwargs): - try: - rtn_value = func(*args, **kwargs) - assert_equal( - expected_http_code, - 200, - "Expected the function to return http code %s but instead got " - "no error (code 200?)." % expected_http_code) - return rtn_value - except exceptions.ClientException as ce: - assert_equal( - expected_http_code, - ce.code, - "Expected the function to return http code %s but instead got " - "code %s." % (expected_http_code, ce.code)) - - def create_client(*args, **kwargs): """ Using the User Requirements as arguments, finds a user and grabs a new