From 14037b46e694399eb722c89665680a05684c2d33 Mon Sep 17 00:00:00 2001 From: Peter Portante Date: Sun, 1 Sep 2013 12:50:07 -0400 Subject: [PATCH] Flake8 container test_server.py (11 of 12) Change-Id: Ie06ed2955838556d5399a49ba3599dfbca4f7512 Signed-off-by: Peter Portante --- test/unit/container/test_server.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/unit/container/test_server.py b/test/unit/container/test_server.py index bf87450445..2a61ded126 100644 --- a/test/unit/container/test_server.py +++ b/test/unit/container/test_server.py @@ -64,7 +64,8 @@ class TestContainerController(unittest.TestCase): # Ensure no acl by default req = Request.blank('/sda1/p/a/c', environ={'REQUEST_METHOD': 'PUT'}, headers={'X-Timestamp': '0'}) - req.get_response(self.controller) + resp = req.get_response(self.controller) + self.assert_(resp.status.startswith('201')) req = Request.blank('/sda1/p/a/c', environ={'REQUEST_METHOD': 'HEAD'}) response = req.get_response(self.controller) self.assert_(response.status.startswith('204')) @@ -75,6 +76,7 @@ class TestContainerController(unittest.TestCase): headers={'X-Timestamp': '1', 'X-Container-Read': '.r:*', 'X-Container-Write': 'account:user'}) resp = req.get_response(self.controller) + self.assert_(resp.status.startswith('204')) req = Request.blank('/sda1/p/a/c', environ={'REQUEST_METHOD': 'HEAD'}) response = req.get_response(self.controller) self.assert_(response.status.startswith('204')) @@ -86,6 +88,7 @@ class TestContainerController(unittest.TestCase): headers={'X-Timestamp': '3', 'X-Container-Read': '', 'X-Container-Write': ''}) resp = req.get_response(self.controller) + self.assert_(resp.status.startswith('204')) req = Request.blank('/sda1/p/a/c', environ={'REQUEST_METHOD': 'HEAD'}) response = req.get_response(self.controller) self.assert_(response.status.startswith('204')) @@ -96,6 +99,7 @@ class TestContainerController(unittest.TestCase): headers={'X-Timestamp': '4', 'X-Container-Read': '.r:*', 'X-Container-Write': 'account:user'}) resp = req.get_response(self.controller) + self.assert_(resp.status.startswith('201')) req = Request.blank('/sda1/p/a/c2', environ={'REQUEST_METHOD': 'HEAD'}) response = req.get_response(self.controller) self.assert_(response.status.startswith('204'))