def setUp(self): super(FancyPagesWebTest, self).setUp() MockTemplateMixin.setUp(self) self.user = None if self.is_staff: self.is_anonymous = False if self.is_staff or not self.is_anonymous: self.user = User.objects.create_user(username=self.username, email=self.email, password=self.password) self.user.is_staff = self.is_staff self.user.save()
def setUp(self): super(FancyPagesWebTest, self).setUp() MockTemplateMixin.setUp(self) self.user = None if self.is_staff: self.is_anonymous = False if self.is_staff or not self.is_anonymous: self.user = User.objects.create_user( username=self.username, email=self.email, password=self.password) self.user.is_staff = self.is_staff self.user.save()
def tearDown(self): super(FancyPagesTestCase, self).tearDown() MockTemplateMixin.tearDown(self)
def setUp(self): super(FancyPagesTestCase, self).setUp() MockTemplateMixin.setUp(self)