Mocking open() in Python 3 unit tests

How to mock calls to open() without interfering with the builtin open().