From 4d8f1b6ea8e5ce0738f1d7e645d3a36f2bd7f9a0 Mon Sep 17 00:00:00 2001 From: kgriffs Date: Wed, 8 Jan 2014 13:44:49 -0600 Subject: [PATCH] test: Use srmock header_dict in preparation for Falcon 0.1.8 Falcon 0.1.8 returns lowercased headers to the client. This *should* be OK, since well-behaved clients treat headers as case-insensitive. However, srmock exposes the response headers directly and we do an assert using them without taking into account case of the header name. This patch modifies that particular assert to use srmock.header_dict instead, since in 0.1.8 that is implemented using a case-insensitive dict. Change-Id: Ib7435a0a51ccf1d5d1ab8da672a12cf3233f9e8e --- tests/unit/queues/transport/wsgi/test_queue_lifecycle.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/queues/transport/wsgi/test_queue_lifecycle.py b/tests/unit/queues/transport/wsgi/test_queue_lifecycle.py index 6111eefbe..805f5deb3 100644 --- a/tests/unit/queues/transport/wsgi/test_queue_lifecycle.py +++ b/tests/unit/queues/transport/wsgi/test_queue_lifecycle.py @@ -63,8 +63,8 @@ class QueueLifecycleBaseTest(base.TestBase): self.simulate_put(path, project_id) self.assertEqual(self.srmock.status, falcon.HTTP_201) - location = ('Location', '/v1/queues/gumshoe') - self.assertIn(location, self.srmock.headers) + location = self.srmock.headers_dict['Location'] + self.assertEqual(location, '/v1/queues/gumshoe') # Ensure queue existence self.simulate_head(path, project_id)