コード例 #1
0
    def setUp(self):
        super(I18nLangPrefTests, self).setUp()
        # Create one user and save it to the database
        email = '*****@*****.**'
        pwd = 'test_password'
        self.user = UserFactory.build(username='******', email=email)
        self.user.set_password(pwd)
        self.user.save()

        # Create a registration for the user
        RegistrationFactory(user=self.user)

        # Create a profile for the user
        UserProfileFactory(user=self.user)

        # Create the test client
        self.client = Client()

        # Get the login url & log in our user
        try:
            login_url = reverse('login_post')
        except NoReverseMatch:
            login_url = reverse('login')
        self.client.post(login_url, {'email': email, 'password': pwd})

        # Url and site lang vars for tests to use
        self.url = reverse('dashboard')
        self.site_lang = settings.LANGUAGE_CODE
コード例 #2
0
ファイル: test_login.py プロジェクト: xrayumr/edx-platform
    def setUp(self):
        """Setup a test user along with its registration and profile"""
        super(LoginTest, self).setUp()
        self.user = self._create_user(self.username, self.user_email)

        RegistrationFactory(user=self.user)
        UserProfileFactory(user=self.user)

        self.client = Client()
        cache.clear()

        self.url = reverse('login_api')
コード例 #3
0
    def setUp(self):
        super(TestPasswordVerificationView, self).setUp()
        self.user = UserFactory.build(username='******', is_active=True)
        self.password = '******'
        self.user.set_password(self.password)
        self.user.save()
        # Create a registration for the user
        RegistrationFactory(user=self.user)

        # Create a profile for the user
        UserProfileFactory(user=self.user)

        # Create the test client
        self.client = Client()
        cache.clear()
        self.url = reverse('verify_password')
コード例 #4
0
ファイル: test_login.py プロジェクト: satyasashi/edx-platform
    def setUp(self):
        """Setup a test user along with its registration and profile"""
        super(LoginTest, self).setUp()
        self.user = UserFactory.build(username=self.username, email=self.user_email)
        self.user.set_password(self.password)
        self.user.save()

        RegistrationFactory(user=self.user)
        UserProfileFactory(user=self.user)

        self.client = Client()
        cache.clear()

        try:
            self.url = reverse('login_post')
        except NoReverseMatch:
            self.url = reverse('login')
コード例 #5
0
    def setUp(self):
        # Create one user and save it to the database
        self.user = UserFactory.build(username='******', email='*****@*****.**')
        self.user.set_password('test_password')
        self.user.save()

        # Create a registration for the user
        RegistrationFactory(user=self.user)

        # Create a profile for the user
        UserProfileFactory(user=self.user)

        # Create the test client
        self.client = Client()
        cache.clear()

        # Store the login url
        try:
            self.url = reverse('login_post')
        except NoReverseMatch:
            self.url = reverse('login')
コード例 #6
0
ファイル: test_email.py プロジェクト: singuliere/edx-platform
 def setUp(self):
     super(ReactivationEmailTests, self).setUp()
     self.user = UserFactory.create()
     self.unregisteredUser = UserFactory.create()
     self.registration = RegistrationFactory.create(user=self.user)
コード例 #7
0
ファイル: test_email.py プロジェクト: CEIT-UQ/edx-platform
 def setUp(self):
     self.user = UserFactory.create()
     self.unregisteredUser = UserFactory.create()
     self.registration = RegistrationFactory.create(user=self.user)
コード例 #8
0
 def setUp(self):
     self.user = UserFactory.create()
     self.unregisteredUser = UserFactory.create()
     self.registration = RegistrationFactory.create(user=self.user)
コード例 #9
0
ファイル: test_email.py プロジェクト: TeachAtTUM/edx-platform
 def setUp(self):
     super(ReactivationEmailTests, self).setUp()
     self.user = UserFactory.create()
     self.unregisteredUser = UserFactory.create()
     self.registration = RegistrationFactory.create(user=self.user)