diff options
| author | Denis Makogon <dmakogon@mirantis.com> | 2013-12-10 18:49:20 +0200 |
|---|---|---|
| committer | Denis Makogon <dmakogon@mirantis.com> | 2013-12-10 18:49:20 +0200 |
| commit | 69c865695f388141bcbf645e57771bcb3fcdb491 (patch) | |
| tree | 50cb616ebc6fefda52a6efd96141dcacc4ea2110 /troveclient/tests/test_common.py | |
| parent | 7499015e510fbd8f900581fabafdc586b097ab3c (diff) | |
| download | python-troveclient-69c865695f388141bcbf645e57771bcb3fcdb491.tar.gz | |
Ignore fewer PEP8/flake8 rules
Reasons:
- code should be pythonicaly clean,
that is why number of ignored rules should reduced
Changes:
- E125, F811, H102, H103, F201, H23,
H302, F841, H301, H702, H703 rules are now enabled
Change-Id: Ibf4025162244d3c2f1278b49a76ec1527a729042
Diffstat (limited to 'troveclient/tests/test_common.py')
| -rw-r--r-- | troveclient/tests/test_common.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/troveclient/tests/test_common.py b/troveclient/tests/test_common.py index d4631fe..888f0d4 100644 --- a/troveclient/tests/test_common.py +++ b/troveclient/tests/test_common.py @@ -17,18 +17,18 @@ # License for the specific language governing permissions and limitations # under the License. -from testtools import TestCase -from mock import Mock +import testtools +import mock from troveclient import common -class CommonTest(TestCase): +class CommonTest(testtools.TestCase): def test_check_for_exceptions(self): status = [400, 422, 500] for s in status: - resp = Mock() + resp = mock.Mock() resp.status_code = s self.assertRaises(Exception, common.check_for_exceptions, resp, "body") @@ -46,7 +46,7 @@ class CommonTest(TestCase): common.limit_url(url, limit=limit, marker=marker)) -class PaginatedTest(TestCase): +class PaginatedTest(testtools.TestCase): def setUp(self): super(PaginatedTest, self).setUp() @@ -88,7 +88,6 @@ class PaginatedTest(TestCase): def test___reversed__(self): itr = self.pgn.__reversed__() - expected = ["item2", "item1"] self.assertEqual("item2", next(itr)) self.assertEqual("item1", next(itr)) self.assertRaises(StopIteration, next, itr) |
