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 …..…. [email protected]
IRC ……..… pcm_ (irc.freenode.com)
TW ………... @pmichali
GPG Key … 4525ECC253E31A83
Fingerprint .. 307A 96BB 1A4C D2C7 931D 8D2D 4525 ECC2 53E3 1A83



Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
OpenStack-dev mailing list
[email protected]
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to