Merge pull request #260 from mgorny/mock

Use built-in unittest.mock when available