title: assert true vs assert is not None
body: <p>I am working on some automated tests with a colleague and we wondered whether there were any differences in our approaches.</p>
  
  <p>We have a method that returns a HTTP response object. Occasionally, it might return None, but normally an object.</p>
  
  <p>The original code is:</p>
  
  <pre><code>self.assertTrue(response)
  </code></pre>
  
  <p>But I felt it might be more readable to have:</p>
  
  <pre><code>assert response is not None
  </code></pre>
  
  <p>I looked into the differences in the docs on truthyness, so I'm aware of things that would return true that aren't necessarily None. However, for the most part, both would work. And a lot of the existing tests are asserting true rather than asserting not none.</p>
  
  <p>Is there any reason why one technique would work better than the other?</p>