Bug 1119116

Summary: [RFE][python-cinderclient]: Test mocking with requests-mock
Product: Red Hat OpenStack Reporter: RHOS Integration <rhos-integ>
Component: RFEsAssignee: RHOS Maint <rhos-maint>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: markmc, yeylon
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://blueprints.launchpad.net/python-cinderclient/+spec/http-mock-testing
Whiteboard: upstream_milestone_none upstream_definition_obsolete upstream_status_unknown
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-19 17:00:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description RHOS Integration 2014-07-14 04:06:20 UTC
Cloned from launchpad blueprint https://blueprints.launchpad.net/python-cinderclient/+spec/http-mock-testing.

Description:

The current testing process involves faking out a lot of client code. This has two major problems:
1. A lot of what we are testing is mocking infrastructure rather than actual code.
2. It is very reliant on the current structure of the client.

In general i would like to push towards adopting the keystoneclient session object as the base means of communication, but first we must make the testing process more resilient and less tied to how the client currently works.

Initially this was planned to be done with HTTPretty, however requirements has allowed a new library called requests-mock which is requests library specific but easier to work with.

Specification URL (additional information):

None