Add httmock to test-requirements.txt and update requests -> 2.1.0

Bug #1282855 reported by Paul Michali
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Invalid
Undecided
Unassigned

Bug Description

To enhance unit testing of REST API code I'd like to add this PyPI package to test-requirements.txt.

I had this as part of my Icehouse-3 review for VPNaaS device driver, in requirements.txt, but it was failing Jenkins as this is not on the master requirements.

Since it is only used for unit testing, it was suggested to place this in test-requirements.txt. So, I'm going to push a separate review just for this file, so I can use it for other commits.

Ref: https://pypi.python.org/pypi/httmock/

Paul Michali (pcm)
Changed in neutron:
assignee: nobody → Paul Michali (pcm)
status: New → In Progress
Revision history for this message
Paul Michali (pcm) wrote :

For my VPNaaS device driver review (74156), I also changed requests lib to 2.1.0 (from 1.1).

Should I leave that in the review, add it to the patch along with httmock, or create another patch for that change?

Revision history for this message
Paul Michali (pcm) wrote :

Found out that I need to do this in global-requirements and then after approved, do in Neutron. Will do both package files under this request.

summary: - Add httmock to test-requirements.txt
+ Add httmock to test-requirements.txt and update requests -> 2.1.0
Revision history for this message
Paul Michali (pcm) wrote :

Need review and approval, please...

Revision history for this message
Paul Michali (pcm) wrote :

Will do just httmock for this bug, per Sean Dague's request.

Revision history for this message
Paul Michali (pcm) wrote :

Would like to lobby for including httmock in the test-requirements. It is a versatile package that works well with the Requests package to allow HTTP testing w/o involving a web server (essentially is a decorator that intercepts send() calls for requests package, allowing customization of responses).

For example of use, see /opt/stack/neutron/neutron/tests/unit/services/vpn/device_drivers/notest_cisco_csr_rest.py and cisco_csr_mock.py in the same area.

Someone mentioned this may be a better replacement for httpretty?

Revision history for this message
Paul Michali (pcm) wrote :

Please change this status to Won't Fix. Will open a new bug to convert the unittest module in VPN Cisco driver to use HTTPretty, which is already an approved testing package.

Changed in neutron:
assignee: Paul Michali (pcm) → nobody
Paul Michali (pcm)
Changed in neutron:
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.