bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

use requests_mock for mocking requests

RESOLVED FIXED

Status

Input Graveyard
Code Quality
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: willkg, Assigned: willkg)

Tracking

Details

(Whiteboard: u=dev c=tests p=1 s=input.2015q2)

We use requests in a few places to access services via their public APIs. When writing tests for these services, we do all this mock shenanigans.

Pretty sure it'll be a lot easier to use requests-mock.

This issue covers switching to requests-mock for mocking APIs.
URL is here: https://pypi.python.org/pypi/requests-mock

I'm going to grab this now since it'll make testing the SUMO Search Suggest provider much easier.
Assignee: nobody → willkg
Status: NEW → ASSIGNED
PR: https://github.com/mozilla/fjord/pull/571

Landed in master: https://github.com/mozilla/fjord/commit/0bec50c734f1ac234216cd48958e463e1a3eea0f

This updated requests and six, too, so I'm going to leave this open until we push to production.
Whiteboard: u=dev c=tests p= s=input.2015q2 → u=dev c=tests p=1 s=input.2015q2
Pushed to production just now. Closing this out.
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Product: Input → Input Graveyard
You need to log in before you can comment on or make changes to this bug.