[openstack-dev] [neutron] Need community weigh-in on requests-mock

Carl Baldwin carl at ecbaldwin.net
Fri Aug 22 20:36:17 UTC 2014

I put this in the review but will repeat it here.  +1 to adding the
dependency with the tests that you've written to require it when those
tests have been reviewed and accepted.  I don't have an objection to
adding requests-mock as a test-requirement.


On Fri, Aug 22, 2014 at 12:50 PM, Paul Michali (pcm) <pcm at cisco.com> wrote:
> Hi! Need to get the community to weigh in on this…
> In Neutron there currently is no mock library for the Requests package.
> During Icehouse, I created unit tests that used the httmock package (a
> context-library based Requests mock). However, the community did not want me
> to add this to global requirements, because there was httpretty (a URL
> registration based mock) already approved for use (but not in Neutron). As a
> result, I disabled the UTs (renaming the module to have a “no” prefix).
> Instead of modifying the UT to work with httpretty, and requesting that
> httpretty be added to Neutron test-requirements, I waited, as there was
> discussion on replacing httpretty.
> Fast forward to now, and there is a new requests-mock package that has been
> implemented, added to global requirements, and is being used in keystone
> client and nova client projects.  My goal is to make use of the new mock
> library, as it has become the library of choice.
> I have migrated my UT to use the requests-mock package, and would like to
> gain approval to add requests-mock to Neutron. I have two commits out for
> review. The first, https://review.openstack.org/#/c/115107/, is to add
> requests-mock to test-requirements for Neutron. The
> second,https://review.openstack.org/#/c/116018/, has the UT module reworked
> to use requests-mock, AND includes the addition of requests-mock to
> test-requirements (so that there is one commit showing the use of this new
> library - originally, I had just the UT, but there was a request to join the
> two changes).
> Community questions:
> Is it OK to add requests-mock to Neutron test-requirements?
> If so, would you rather see this done as two commits (one for the package,
> one for the UT), or one combined commit?
> Cores, you can “vote/comment” in the reviews, so that I can proceed in the
> right direction.
> Thanks for your consideration!
> PCM (Paul Michali)
> MAIL …..…. pcm at cisco.com
> IRC ……..… pcm_ (irc.freenode.com)
> TW ………... @pmichali
> GPG Key … 4525ECC253E31A83
> Fingerprint .. 307A 96BB 1A4C D2C7 931D 8D2D 4525 ECC2 53E3 1A83
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

More information about the OpenStack-dev mailing list