title: How to mock patch a django model field?
body: <p>I have these 2 models:</p>
  
  <pre><code>class Transaction(models.Model):
      gateway_reference = models.CharField(max_length=255, null=True, blank=True)
      ...
  
      @property
      def abc(self):
          ...
  
  class Item(models.Model):
      txn = models.ForeignKey('Transaction')
  
      def refund(self):
         Gateway.refund(self.txn)
  </code></pre>
  
  <p>In my unittest:</p>
  
  <pre><code>def test_decline(self):
      item = Item.objects.get(...)
      with patch('app.models.Transaction.gateway_reference', new='invalid reference'):
          item.refund()
  </code></pre>
  
  <p>But it complains that <code>Transaction class does not have the attribute 'gateway_reference'</code></p>
  
  <p>NOTE:
  I am using similar patch for an property of a model class and it worked fine, eg.</p>
  
  <pre><code>with patch('app.models.Transaction.abc', new='lalala')
  </code></pre>