title: mock file open in python
body: <p>I'm trying to mock file open, and all of the examples show that I need to </p>
  
  <pre><code>@patch('open', create=True) 
  </code></pre>
  
  <p>but I keep getting </p>
  
  <pre><code>Need a valid target to patch. You supplied: 'open'
  </code></pre>
  
  <p>I know patch needs the <strong>full dotted path of <code>open</code></strong>, but I have no idea what it is. As a matter of fact, I'm not even sure that's the problem.</p>