Skip to content

Commit

Permalink
Add requests-mock package to global requirements
Browse files Browse the repository at this point in the history
requests-mock is a mocking layer for the requests package. It is
Apache-2 licensed.

The httpretty library has been used to provide a mocking layer for HTTP
requests. This has generally been successful however there have been a
number of problems with it over our usage, including poor python 3
support and a number of backwards incompatible releases from the
maintainer. It is also difficult to package by distributions.

httpretty was particularly chosen because it was compatible with both
httplib and requests, this is no longer such a requirement as almost all
OpenStack libraries have now moved to requests. Given that we can move
to a library with less complexity and more inline with OpenStack tools.

It is written in such a way that it is fairly simple to convert existing
httpretty test suites or httmock test suites to requests-mock.

I am the author of requests-mock and am also happy to move it to
stackforge, or otherwise connect it to gerrit so as we will not have any
future incompatible issues.

More info:
 - https://github.com/jamielennox/requests-mock
 - http://requests-mock.readthedocs.org/en/latest/

This would ideally not need to be in the icehouse branch however grenade
and other gate tests all run with the most current client release and so
require that the dependencies of the client match what is in the
requirements.

Change-Id: I09f2a22f84752571a278e9b90901ecb1fbedb654
(cherry picked from commit a0af4fa)
  • Loading branch information
Jamie Lennox committed Jul 26, 2014
1 parent 8912a39 commit 0293500
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions global-requirements.txt
Expand Up @@ -100,6 +100,7 @@ PyYAML>=3.1.0
qpid-python
requests>=1.1
Routes>=1.12.3,!=2.0
requests-mock>=0.4.0 # Apache-2.0
rtslib-fb>=2.1.39
simplejson>=2.0.9
six>=1.6.0
Expand Down

0 comments on commit 0293500

Please sign in to comment.