Test mocking with requests-mock
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.
Blueprint information
- Status:
- Complete
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- Jamie Lennox
- Direction:
- Needs approval
- Assignee:
- Jamie Lennox
- Definition:
- Obsolete
- Series goal:
- None
- Implementation:
-
Unknown
- Milestone target:
- None
- Started by
- Completed by
- Sean McGinnis
Related branches
Related bugs
Sprints
Whiteboard
Gerrit topic: https:/
Addressed by: https:/
Convert base HTTP tests to httpretty
Addressed by: https:/
Convert auth tests to HTTPretty
Addressed by: https:/
Convert Availability Zone testing to HTTPretty
Addressed by: https:/
Convert QOS tests to HTTPretty
Addressed by: https:/
Convert Quota Class Sets testing to HTTPretty
Gerrit topic: https:/
Addressed by: https:/
Replace httpretty with requests-mock
Addressed by: https:/
Convert snapshot tests to requests-mock
Addressed by: https:/
convert availability zone tests to requests-mock
Addressed by: https:/
Convert qos tests to requests-mock
Addressed by: https:/
Convert quota tests to requests-mock
Addressed by: https:/
Convert quota classes tests to requests-mock
Addressed by: https:/
Convert services tests to requests-mock
Addressed by: https:/
Convert volume type tests to requests-mock
Addressed by: https:/
Convert volume backup tests to requests-mock