mozilla / PyFxA

Python library for interacting with the Firefox Accounts ecosystem
Other
30 stars 20 forks source link

Mock server responses for core API tests #4

Open rfk opened 9 years ago

rfk commented 9 years ago

The tests currently talk to a live server, which is great for dev testing but not ideal for an automated suite. We should change them to use mocked responses by default, but still be able to talk to a live server if requested explicitly.

vladikoff commented 9 years ago

We have these mocks for the fxa-js-client that might be useful: https://github.com/mozilla/fxa-js-client/tree/master/tests/mocks

leplatrem commented 9 years ago

It might result quite complex to write a single piece of code that would fit with both mocked and real server responses.

But I guess having two test suits could make sense! One with mocked server responses focused on unit tests, and another one talking to a real server focused on functional tests.

(my two cents)

Natim commented 9 years ago

I started using mocks for #23 and #28