Comment 4 for bug 1485452

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to barbican (master)

Submitter: Jenkins
Branch: master

commit c4d662c4077479e22ca7e40d658eecb499f4d718
Author: Dave McCowan <email address hidden>
Date: Wed Sep 2 12:05:20 2015 -0400

    Change test_containers unit test to work around webtest issue

    The test_should_raise_container_no_content_type_header() is
    misnamed. In this test, the Content-type: header is sent, but
    there is no value sent with it.

    When webtest processed this request with Python3, it hit an infamous
    sting/bytes issue while sending the POST. The issue was hit in webtest
    and cgi code, not in Barbican code.

    From a Barbican point of view, testing
       Content-type: \r\n
       Content-type: bad_content_type\r\n
    runs through the same code, fails the same test, and throws the
    same exception.

    Therefore, I propose we rename and change the test case to the second
    case. Webtest does not have a problem handling this test in Python3.
    The same conditions are tested and verified for Python2 and 3.

    Change-Id: I22d597e61fc37d24526e4dac554983108ceaa507
    Related-blueprint: blueprint barbican-py3
    Closes-bug: #1485452