From 88b06d2487d4c1a584b1be8fa31578d701569a3a Mon Sep 17 00:00:00 2001 From: John Dickinson Date: Tue, 19 Apr 2011 15:57:44 -0500 Subject: [PATCH] made failing unit test for HEAD requests --- test/unit/obj/test_server.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/unit/obj/test_server.py b/test/unit/obj/test_server.py index 6628d7dd64..7463e6636c 100644 --- a/test/unit/obj/test_server.py +++ b/test/unit/obj/test_server.py @@ -343,6 +343,19 @@ class TestObjectController(unittest.TestCase): "Content-Encoding" in resp.headers) self.assertEquals(resp.headers['Content-Type'], 'application/x-test') + req = Request.blank('/sda1/p/a/c/o', + environ={'REQUEST_METHOD': 'HEAD'}) + resp = self.object_controller.HEAD(req) + self.assert_("X-Object-Meta-1" not in resp.headers and + "X-Object-Meta-Two" not in resp.headers and + "X-Object-Meta-3" in resp.headers and + "X-Object-Meta-4" in resp.headers and + "Foo" in resp.headers and + "Bar" in resp.headers and + "Baz" not in resp.headers and + "Content-Encoding" in resp.headers) + self.assertEquals(resp.headers['Content-Type'], 'application/x-test') + timestamp = normalize_timestamp(time()) req = Request.blank('/sda1/p/a/c/o', environ={'REQUEST_METHOD': 'POST'},