title: Django Model function behavior changes based on how many tests being run
body: <p>I have a need for a uniqueID within my Django code. I wrote a simple model like this</p>
  <pre><code>class UniqueIDGenerator(models.Model):
      nextID = models.PositiveIntegerField(blank=False)
  
      @classmethod
      def getNextID(self):
          if(self.objects.filter(id=1).exists()):
              idValue = self.objects.get(id=1).nextID
              idValue += 1
              self.objects.filter(id=1).update(nextID=idValue)
              return idValue
  
          tempObj = self(nextID=1)
          tempObj.save()
          return tempObj.nextID
  </code></pre>
  <p>Then I wrote a unit test like this:</p>
  <pre><code>class ModelWorking(TestCase):
  
      def setUp(self):
          return None
  
      def test_IDGenerator(self):
          returnValue = UniqueIDGenerator.getNextID()
          self.assertEqual(returnValue, 1)
          returnValue = UniqueIDGenerator.getNextID()
          self.assertEqual(returnValue, 2)
          return None
  </code></pre>
  <p>When I run this test by itself, it runs fine. No issues.</p>
  <p>When I run this test as a suite, which includes a bunch of other unit tests as well (<em>which include calls to getNextID() as well</em>), this test fails. The getNextID() always returns 1. Why would that be happening?</p>