Comment 2 for bug 1647880

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

Reviewed: https://review.openstack.org/407770
Committed: https://git.openstack.org/cgit/openstack/requests-mock/commit/?id=86fb33d13d9ad2b3f281e66179b342e00ee07286
Submitter: Jenkins
Branch: master

commit 86fb33d13d9ad2b3f281e66179b342e00ee07286
Author: Jamie Lennox <email address hidden>
Date: Wed Dec 7 11:10:14 2016 +1100

    Type check the empty string when creating repsonse

    When creating a response we type check that the user has passed the
    correct type to content and text, however we check this based on whether
    the value is True and not whether it has been passed at all which means
    that the empty string of the wrong type can incorrectly pass through
    this check.

    Fix this check to test the empty string.

    Anyone relying on this passing will be caught with a more confusing
    TypeError later and so this should be backwards compatible.

    Change-Id: I826da9b7fd83bb88af50e4a96a5e6358ee35e4b2
    Closes-Bug: #1647880