Closed Bug 770925 Opened 12 years ago Closed 12 years ago

Mock solitude out

Categories

(Marketplace Graveyard :: Payments/Refunds, defect, P4)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: andy+bugzilla, Assigned: andy+bugzilla)

References

Details

It would be nice to do rudimentary sales of apps in zamboni without having to run solitude. It's also getting tiresome in the tests to continually be mocking out the client. 

It would be nice if we had a Mock client that could be used, similar to the Redis Mock. That could be used by people to test things without solitude and keep our tests nice and simple.
Had a go at this, but not sure the best way to go about it. If anyone has a good idea and wants to do it, ping me.
Priority: -- → P4
I was doing this in the client. That's just wrong. Will do it in solitude by mocking out the client object so it doesn't actually speak to PayPal.
Assignee: nobody → amckay
I feel like we should brainstorm on this during work week. This would be really useful for setting up dev sandboxes.
Happy to brainstorm on this, a basic implementation is done. You can use all the features on a dev site without have to touch paypal and watch solitude getting populated.

https://github.com/mozilla/solitude/commit/7d689f
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Nice! I was thinking of elaborate schemes like providing a dashboard to view all the things that Solitude has done. But it needs more thought. I'm trying to think about how to make a sandbox environment for developers that doesn't touch any pay providers but gives devs feedback about what happened in their in-app flow. bug 734516 is related.
django-admin could get us quite a ways on that. I want to ship anything like that as an addition to solitude for perceived security reasons.

I was also thinking of a REST API that you can call and override the mock. So you could call the REST API and say the next call to get-pay-key will return this specific Paypal data, so we could test how errors are handled... might play with that on the plane.
You need to log in before you can comment on or make changes to this bug.