from django.contrib.auth.models import User from django.test import TestCase class BaseTestCase(TestCase): def setUp(self): super(BaseTestCase, self).setUp() self.alice = User(username="alice", email="alice@example.org") self.alice.set_password("password") self.alice.save()