title: Python: Mock side_effect on object attribute
body: <p>Is it possible to have a side_effect on a property? If I look at the Mock documentation it seems it's only possible on object methods.</p>
  
  <p>I am trying to test the following:</p>
  
  <pre><code>def get_object(self): 
      try:
          return self.request.user.shop
      except Shop.DoesNotExist:
          return None
  </code></pre>
  
  <p>I want Shop to raise a DoesNotExist exception.</p>
  
  <p>Guess maybe I wasn't clear enough but I am talking about the voidspace mock library.</p>
  
  <p><a href="http://www.voidspace.org.uk/python/mock/index.html" rel="noreferrer">http://www.voidspace.org.uk/python/mock/index.html</a></p>