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
This commit is contained in:
kgriffs 2014-01-08 13:44:49 -06:00
parent 13d9fa29e8
commit 4d8f1b6ea8

View File

@ -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)