def setUp(self):
        """
        Load up a DB for the OM.
        Create a client to talk to the OM.
        """
        
        
        call_env_command(test_settings.OM_PROJECT_DIR, "flush",
                         interactive=False)
        self.om_env = Env(test_settings.OM_PROJECT_DIR)
        self.om_env.switch_to()
        
        from openflow.optin_manager.dummyfv.models import DummyFV
        from openflow.optin_manager.xmlrpc_server.models import FVServerProxy
        from openflow.optin_manager.users.models import UserProfile
        from django.contrib.auth.models import User 

        # Create the clearinghouse user
        username = "clearinghouse"
        password = "password"
        u = User.objects.create(username=username)
        u.set_password(password)
        u.save()
        
        profile = UserProfile.get_or_create_profile(u) 
        profile.is_clearinghouse_user = True
        profile.save()
        self.om_client = xmlrpclib.ServerProxy(
            SCHEME + "://%s:%s@%s:%s/xmlrpc/xmlrpc/" % (
                username, password, test_settings.HOST, test_settings.OM_PORT
            )
        )
        
        #creat admin user: use this to look at DBs through admin interface
        username = "admin"
        password = "password"
        u = User.objects.create(username=username, is_superuser=True,
                                is_staff=True, is_active=True)
        u.set_password(password)
        u.save()
        profile = UserProfile.get_or_create_profile(u) 
        profile.is_net_admin = True
        profile.supervisor = u
        profile.max_priority_level = 7000
        profile.save()      
         
         
        # Create dummy FVs
        for i in range(test_settings.NUM_DUMMY_FVS):
            fv = DummyFV.objects.create()
            # Load up a fake topology in the Dummy FV
            fv.populateTopology(10, 20, use_random=test_settings.USE_RANDOM)
            
            # create fake users for the Dummy FV
            username = "om%s" % i
            password = "password"
            u = User.objects.create(username=username)
            u.set_password(password)
            u.save()

            # Create the FV proxy connection
            FVServerProxy.objects.create(
                name="Flowvisor %s" % i,
                username=username,
                password=password,
                url = SCHEME+"://%s:%s/dummyfv/%s/xmlrpc/" % (
                    test_settings.HOST, test_settings.OM_PORT, fv.id,
                ),
            )
dataset/ETHPy150Open fp7-ofelia/ocf/expedient/src/python/plugins/openflow/tests/manual_test/manual.py/ManualTests.setUp/original