'Initial Setup'

def setUp(self):

    if (not self.prepared):
        Object.objects.all().delete()
        (self.group, created) = Group.objects.get_or_create(name='test')
        (duser, created) = DjangoUser.objects.get_or_create(username=self.username)
        duser.set_password(self.password)
        duser.save()
        (self.user, created) = User.objects.get_or_create(user=duser)
        self.user.save()
        (perspective, created) = Perspective.objects.get_or_create(name='default')
        perspective.set_default_user()
        perspective.save()
        ModuleSetting.set('default_perspective', perspective.id)
        self.perspective = Perspective(name='test')
        self.perspective.set_default_user()
        self.perspective.save()
        self.group = Group(name='test')
        self.group.save()
        self.client = Client()
        self.prepared = True
