'Initial Setup'

def setUp(self):

    if (not self.prepared):
        (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.type = ItemType(name='test')
        self.type.set_default_user()
        self.type.save()
        self.status = ItemStatus(name='test')
        self.status.set_default_user()
        self.status.save()
        self.field = ItemField(name='test', label='test', field_type='text')
        self.field.set_default_user()
        self.field.save()
        self.item = Item(name='test', item_type=self.type, status=self.status)
        self.item.set_default_user()
        self.item.save()
        self.value = ItemValue(field=self.field, item=self.item)
        self.value.save()
        self.servicing = ItemServicing(name='test')
        self.servicing.set_default_user()
        self.servicing.save()
        self.client = Client()
        self.prepared = True
