fixed pep8 blanklines violation and added support of mock < 0.8
fixed pep8 blanklines violation and added support of mock < 0.8


Former-commit-id: 2ed86df0681259d7919caaeea564345ed427b3b3 [formerly e641fd2607e2cc9bc1bbd0df076dd755e7d9b156] [formerly e641fd2607e2cc9bc1bbd0df076dd755e7d9b156 [formerly 0cc37a622cd659e8f02eaf4a4967bfaf3c264a30]]
Former-commit-id: f5c525c376a5b03a1aa3cde0f799e966289cf34e
Former-commit-id: d294e5b61194ccabf279af50b805c833b121e026
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine