Rather than passing in a mock object, you should use [`mock.patch`](http://www.voidspace.org.uk/python/mock/patch.html#mock.patch) to replace the `subprocess` module with a fake. For example, you could do:
```python
def setUp(self):
    patcher = mock.patch("diff_cover.git_path.subprocess")
    patcher.start()
    self.addCleanup(patcher.stop)
```
and then when you run your code in the test, running `import subprocess` will get a mock object, rather than the real `subprocess` module.