compatible with withmock
Merge pull request #23 from jwfang/master

compatible with withmock