コード例 #1
0
    def test_header_items(self):
        response = Response()
        response.delete_cookie('test_cookie')
        response.headers['Location'] = '/'

        self.assertEqual(response.headers_items().sort(), [
            ('Content-Type', 'text/html; charset=utf8'),
            ('Location', '/'),
            ('Set-Cookie', ' test_cookie=; expires=Thu, 01-Jan-1970 00:00:00 GMT; Max-Age=0; Path=/')
        ].sort())