Fixed #22979 -- Moved bug* tests

This commit is contained in:
Tushar Bhatia 2014-07-26 09:23:01 +08:00 committed by Tim Graham
parent f14898a453
commit 11181a64f9
10 changed files with 49 additions and 79 deletions

View file

@ -407,3 +407,19 @@ class StumpJoke(models.Model):
class Student(models.Model):
character = models.ForeignKey(Character)
study = models.CharField(max_length=30)
# Model for #639
class Photo(models.Model):
title = models.CharField(max_length=30)
image = models.FileField(storage=temp_storage, upload_to='tests')
# Support code for the tests; this keeps track of how many times save()
# gets called on each instance.
def __init__(self, *args, **kwargs):
super(Photo, self).__init__(*args, **kwargs)
self._savecount = 0
def save(self, force_insert=False, force_update=False):
super(Photo, self).save(force_insert, force_update)
self._savecount += 1