title: Testing exception message with assertRaise
body: <p>I am trying to assertRaise the exception inside a function where a condition raises a custom exception message .</p>
  
  <p>Function:</p>
  
  <pre><code>if not Cart.objects.filter(member=member).count():
      raise CartDoesNotExist("Cart Does Not Exist for Member: %s ( %id )." % (member.email,member.id))
  </code></pre>
  
  <p>Now , i am able to successfully produce the required condition to get to the raise statement.</p>
  
  <p>So , my testcase looks like this :</p>
  
  <pre><code>def Order_CartDoesNotExist(self):        
    self.assertRaises(CartDoesNotExist,Order.objects.create_order(member=self.member2,member_slot=self.memslot,order_type="Normal"))
  </code></pre>
  
  <p>When i run the test , the output is an Error . It gives the same error CartDoesNotExist.....</p>
  
  <p>So my question is , how to raise these kind of exceptions ? How to cover these situations in our unittest? I do not want to escape these conditions as they are important and increase code coverage?</p>
  
  <p>Thank you all.</p>