def setUp(self):
        if not settings.OAUTH_ENABLED:
            settings.OAUTH_ENABLED = True

        # Create a user
        form = {"username":"jane", "email":"jane@example.com","password":"toto","password2":"toto"}
        self.client.post(reverse(register),form, X_Experience_API_Version=settings.XAPI_VERSION)      
        self.user = User.objects.get(username='jane')

        #Register a consumer
        self.name = "test jane client"
        self.desc = "test jane client desc"
        form = {"name":self.name, "description":self.desc}
        self.client.post(reverse(regclient),form)
        self.consumer = Consumer.objects.get(name=self.name)

        self.name2jane = "test jane client2"
        self.desc2jane = "test jane client desc2"
        form2jane = {"name":self.name2jane, "description":self.desc2jane}
        self.client.post(reverse(regclient),form2jane)
        self.consumer2jane = Consumer.objects.get(name=self.name2jane)


        self.client.logout()
        self.jane_auth = "Basic %s" % base64.b64encode("%s:%s" % ('jane','toto'))

        # Create a user
        self.user2 = User.objects.create_user('dick', 'dick@example.com', 'lassie')
        self.client.login(username='dick', password='lassie')

        #Register a client
        self.name2 = "test client2"
        self.desc2 = "test desc2"
        form2 = {"name":self.name2, "description":self.desc2}
        self.client.post(reverse(regclient),form2)
        self.consumer2 = Consumer.objects.get(name=self.name2)
        self.client.logout()
        self.dick_auth = "Basic %s" % base64.b64encode("%s:%s" % ('dick','lassie'))
dataset/ETHPy150Open adlnet/ADL_LRS/lrs/tests/test_OAuth.py/OAuthTests.setUp/original