Also clear the Recipient table before populating the test database.

(imported from commit e87baf72a40f3c22a6710ce2d05881673fa052d7)
This commit is contained in:
Jessica McKellar
2012-08-28 16:57:45 -04:00
parent 5dd9616f51
commit 7b40df9e8b

View File

@@ -10,7 +10,7 @@ class Command(NoArgsCommand):
help = "Populate a test database"
def handle_noargs(self, **options):
for klass in [Zephyr, ZephyrClass, UserProfile, User]:
for klass in [Zephyr, ZephyrClass, UserProfile, User, Recipient]:
klass.objects.all().delete()
# Create test Users (UserProfiles are automatically created).
@@ -50,4 +50,4 @@ class Command(NoArgsCommand):
new_zephyr.pub_date = datetime.datetime.utcnow()
new_zephyr.save()
self.stdout.write("Successfully populated test database.")
self.stdout.write("Successfully populated test database.\n")