-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33373 from openedx/feanil/update_password_length_…
…default feat: Update the minimum password length.
- Loading branch information
Showing
102 changed files
with
416 additions
and
395 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -184,7 +184,7 @@ def setUp(self): | |
|
||
self.uname = 'testuser' | ||
self.email = '[email protected]' | ||
self.password = 'foo' | ||
self.password = self.TEST_PASSWORD | ||
|
||
# Create the use so we can log them in. | ||
self.user = UserFactory.create(username=self.uname, email=self.email, password=self.password) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,7 +95,7 @@ def setUp(self): | |
super().setUp() | ||
|
||
self.email = '[email protected]' | ||
self.pw = 'xyz' | ||
self.pw = 'password1234' | ||
self.username = 'testuser' | ||
self.client = AjaxEnabledTestClient() | ||
# clear the cache so ratelimiting won't affect these tests | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ class TestMaintenanceIndex(ModuleStoreTestCase): | |
def setUp(self): | ||
super().setUp() | ||
self.user = AdminFactory() | ||
login_success = self.client.login(username=self.user.username, password='test') | ||
login_success = self.client.login(username=self.user.username, password=self.TEST_PASSWORD) | ||
self.assertTrue(login_success) | ||
self.view_url = reverse('maintenance:maintenance_index') | ||
|
||
|
@@ -56,7 +56,7 @@ class MaintenanceViewTestCase(ModuleStoreTestCase): | |
def setUp(self): | ||
super().setUp() | ||
self.user = AdminFactory() | ||
login_success = self.client.login(username=self.user.username, password='test') | ||
login_success = self.client.login(username=self.user.username, password=self.TEST_PASSWORD) | ||
self.assertTrue(login_success) | ||
|
||
def verify_error_message(self, data, error_message): | ||
|
@@ -110,8 +110,8 @@ def test_non_global_staff_access(self, url): | |
""" | ||
Test that all maintenance app views are not accessible to non-global-staff user. | ||
""" | ||
user = UserFactory(username='test', email='[email protected]', password='test') | ||
login_success = self.client.login(username=user.username, password='test') | ||
user = UserFactory(username='test', email='[email protected]', password=self.TEST_PASSWORD) | ||
login_success = self.client.login(username=user.username, password=self.TEST_PASSWORD) | ||
self.assertTrue(login_success) | ||
|
||
response = self.client.get(url) | ||
|
@@ -245,13 +245,13 @@ def setUp(self): | |
self.admin = AdminFactory.create( | ||
email='[email protected]', | ||
username='admin', | ||
password='pass' | ||
password=self.TEST_PASSWORD | ||
) | ||
self.client.login(username=self.admin.username, password='pass') | ||
self.client.login(username=self.admin.username, password=self.TEST_PASSWORD) | ||
self.non_staff_user = UserFactory.create( | ||
email='[email protected]', | ||
username='test', | ||
password='pass' | ||
password=self.TEST_PASSWORD | ||
) | ||
|
||
def test_index(self): | ||
|
@@ -301,7 +301,7 @@ def _test_403(self, viewname, kwargs=None): | |
self.assertEqual(response.status_code, 403) | ||
|
||
def test_authorization(self): | ||
self.client.login(username=self.non_staff_user, password='pass') | ||
self.client.login(username=self.non_staff_user, password=self.TEST_PASSWORD) | ||
announcement = Announcement.objects.create(content="Test Delete") | ||
announcement.save() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,7 +136,7 @@ def _create_account(self): | |
params = { | ||
'username': 'test_user', | ||
'email': '[email protected]', | ||
'password': 'edx', | ||
'password': 'Password1234', | ||
'name': 'Test User', | ||
'honor_code': True, | ||
'terms_of_service': True | ||
|
@@ -319,7 +319,7 @@ def setUp(self, tracker='common.djangoapps.student.views.management.tracker'): | |
self.new_email = '[email protected]' | ||
self.req_factory = RequestFactory() | ||
self.request = self.req_factory.post('unused_url', data={ | ||
'password': 'test', | ||
'password': 'Password1234', | ||
'new_email': self.new_email | ||
}) | ||
self.request.user = self.user | ||
|
@@ -628,7 +628,7 @@ def setUp(self, tracker='common.djangoapps.student.views.management.tracker'): | |
self.new_secondary_email = '[email protected]' | ||
self.req_factory = RequestFactory() | ||
self.request = self.req_factory.post('unused_url', data={ | ||
'password': 'test', | ||
'password': 'Password1234', | ||
'new_email': self.new_secondary_email | ||
}) | ||
self.request.user = self.user | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.