title: Is there anyway to use TestCase.assertEqual() outside of a TestCase?
body: <p>I have a utility class that stores methods that are useful for some unit test cases. I want these helper methods to be able to do asserts/fails/etc., but it seems I can't use those methods because they expect TestCase as their first argument...</p>
  
  <p>I want to be able to store the common methods outside of the testcase code and continue to use asserts in them, is that possible at all? They are ultimately used in testcase code.</p>
  
  <p>I have something like:</p>
  
  <p><strong>unittest_foo.py:</strong></p>
  
  <pre><code>import unittest
  from common_methods import *
  class TestPayments(unittest.TestCase):
   def test_0(self):
    common_method1("foo")
  </code></pre>
  
  <p><strong>common_methods.py:</strong>           </p>
  
  <pre><code>from unittest import TestCase
  def common_method1():
      blah=stuff
      TestCase.failUnless(len(blah) &gt; 5)
          ...
  ...
  </code></pre>
  
  <p>When the suite is run:</p>
  
  <p><code>TypeError: unbound method failUnless() must be called with TestCase instance as first argument (got bool instance instead)</code></p>