title: global name 'mock' is not defined
body: <p>I am trying to do unit testing in Python. I keep running into problems with mock, which <em>should</em> be back ported to Python 2.7, but I can't get it to work.</p>
  
  <p>At the top of the code I have: <code>from mock import MagicMock, call</code>, but I still get errors when I run the unittests where it complains <code>global name 'mock' is not defined</code>. </p>
  
  <p>Frustrated, I went to see if it really was installed (pip install mock and pip install unittest have all been run).</p>
  
  <p>mock.py <em>only</em> exists in <code>/usr/lib/python3.4/unittest/mock.py</code>, which leads me to believe that only Python3 on Debian Jessie really, actually supports mocking objects.</p>
  
  <p>So, here's the question: how do I get the actual backport for 2.7 <strong>or</strong> in the alternative, how do I configure Debian 8 to use Python3 by default for running applications?</p>