summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhongyue Luo <zhongyue.nah@intel.com>2013-08-16 09:23:32 +0800
committerZhongyue Luo <zhongyue.nah@intel.com>2013-08-16 09:23:32 +0800
commite0deef1e75adac6cae245776b2af249b0b7a9dd9 (patch)
treea475d3e601b2ea92452d2da2372cd1de0907e367
parent613ab94486e7b8f3884d02a816a750792d681b20 (diff)
downloadoslo-middleware-e0deef1e75adac6cae245776b2af249b0b7a9dd9.tar.gz
Bump hacking to 0.7.0
Fixes H202, H602 errors Change-Id: Ic3045f15116d1d7a28b63bc94a0a341b9304ffdd
-rw-r--r--tests/unit/middleware/test_correlation_id.py5
-rw-r--r--tests/unit/middleware/test_sizelimit.py4
2 files changed, 4 insertions, 5 deletions
diff --git a/tests/unit/middleware/test_correlation_id.py b/tests/unit/middleware/test_correlation_id.py
index dc83cc7..11939e9 100644
--- a/tests/unit/middleware/test_correlation_id.py
+++ b/tests/unit/middleware/test_correlation_id.py
@@ -36,7 +36,7 @@ class CorrelationIdMiddlewareTest(utils.BaseTestCase):
middleware = correlation_id.CorrelationIdMiddleware(app)
middleware(req)
- self.assertEquals(req.headers.get("X_CORRELATION_ID"), "fake_uuid")
+ self.assertEqual(req.headers.get("X_CORRELATION_ID"), "fake_uuid")
def test_process_request_should_not_regenerate_correlation_id(self):
app = mock.Mock()
@@ -46,5 +46,4 @@ class CorrelationIdMiddlewareTest(utils.BaseTestCase):
middleware = correlation_id.CorrelationIdMiddleware(app)
middleware(req)
- self.assertEquals(req.headers.get("X_CORRELATION_ID"),
- "correlation_id")
+ self.assertEqual(req.headers.get("X_CORRELATION_ID"), "correlation_id")
diff --git a/tests/unit/middleware/test_sizelimit.py b/tests/unit/middleware/test_sizelimit.py
index 7579659..3666b54 100644
--- a/tests/unit/middleware/test_sizelimit.py
+++ b/tests/unit/middleware/test_sizelimit.py
@@ -32,7 +32,7 @@ class TestLimitingReader(utils.BaseTestCase):
for chunk in sizelimit.LimitingReader(data, BYTES):
bytes_read += len(chunk)
- self.assertEquals(bytes_read, BYTES)
+ self.assertEqual(bytes_read, BYTES)
bytes_read = 0
data = six.StringIO("*" * BYTES)
@@ -42,7 +42,7 @@ class TestLimitingReader(utils.BaseTestCase):
bytes_read += 1
byte = reader.read(1)
- self.assertEquals(bytes_read, BYTES)
+ self.assertEqual(bytes_read, BYTES)
def test_limiting_reader_fails(self):
BYTES = 1024