def setUp(self):

        if not self.prepared:
            # Clean up first
            Object.objects.all().delete()

            # Create objects
            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.contact_type = ContactType(name='Person')
            self.contact_type.set_default_user()
            self.contact_type.save()

            self.contact = Contact(name='Test', contact_type=self.contact_type)
            self.contact.set_default_user()
            self.contact.save()

            self.field = ContactField(
                name='Test', label='test', field_type='text')
            self.field.set_default_user()
            self.field.save()

            self.client = Client()

            self.prepared = True

    ######################################
    # Testing views when user is logged in
    ######################################
Uploads a new appversion with the given config and files to the server.
dataset/ETHPy150Open treeio/treeio/treeio/identities/tests.py/IdentitiesViewsTest.setUp--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/appcfg.py/AppVersionUpload.DoUpload