title: How to add/change a variable across django test functions
body: <p>This question might be silly, but I did not find an answer.</p>
  
  <p>I want to add a test function to a class of TestCase to check the completion of the test. For example, the urls were tested, the forms were tested et.al. As such, I would like to have a variable to keep the record of each test. If urls were tested, then VARIABLE["urls"] = True. </p>
  
  <p>Unfortunately, it looks like all the variable were reset in each test function. The message recorded in urls test VARIABLE["urls"] can not been carried on to one other test. Is there any way to have a global variable across all test functions?</p>
  
  <p><strong>Here are the revised working code</strong></p>
  
  <pre><code>class Test(TestCase):
      test = {}
      to_be_test = ["urls","ajax","forms","templates"]
  
      def test_urls(self):
          ...
          self.test['urls'] = True
  
      def test_ajax(self):
          ...
          self.test['ajax'] = True
  
      def test_z_completion(self):
          for t in self.to_be_test:
              if not t in self.test:
                  print "Warning: %s test is missing!" % t
  </code></pre>
  
  <p>The expected result should be:</p>
  
  <pre><code>Warning: forms test is missing!
  Warning: templates test is missing!
  </code></pre>