Test: use sinon.sandbox for easier test restore
Merge pull request #4007 from patheard/sandbox

Test: use sinon.sandbox for easier test restore