test: Update to an even longer password.

This commit is contained in:
Feanil Patel
2023-10-11 13:44:09 -04:00
parent 1e2ea85372
commit 64e91d4080
47 changed files with 88 additions and 88 deletions

View File

@@ -184,7 +184,7 @@ class InternationalizationTest(ModuleStoreTestCase):
self.uname = 'testuser'
self.email = 'test+courses@edx.org'
self.password = 'password'
self.password = 'Password1234'
# Create the use so we can log them in.
self.user = UserFactory.create(username=self.uname, email=self.email, password=self.password)

View File

@@ -35,7 +35,7 @@ from common.djangoapps.student.roles import OrgStaffRole
from openedx.core.djangoapps.content.course_overviews.models import CourseOverview
from openedx.core.djangoapps.content.course_overviews.tests.factories import CourseOverviewFactory
TEST_PASSWORD = 'password'
TEST_PASSWORD = 'Password1234'
class GroupFactory(DjangoModelFactory): # lint-amnesty, pylint: disable=missing-class-docstring
@@ -81,7 +81,7 @@ class UserFactory(DjangoModelFactory): # lint-amnesty, pylint: disable=missing-
model = User
django_get_or_create = ('email', 'username')
_DEFAULT_PASSWORD = 'password'
_DEFAULT_PASSWORD = 'Password1234'
username = factory.Sequence('robot{}'.format)
email = factory.Sequence('robot+test+{}@edx.org'.format)

View File

@@ -324,9 +324,9 @@ class LoginFailuresAdminTest(TestCase):
def setUpClass(cls):
"""Setup class"""
super().setUpClass()
cls.user = UserFactory.create(username='§', is_staff=True, is_superuser=True)
cls.TEST_PASSWORD = 'Password1234'
cls.user = UserFactory.create(username='§', password=cls.TEST_PASSWORD, is_staff=True, is_superuser=True)
cls.user.save()
cls.TEST_PASSWORD = 'password'
def setUp(self):
"""Setup."""

View File

@@ -136,7 +136,7 @@ class ActivationEmailTests(EmailTemplateTagMixin, CacheIsolationTestCase):
params = {
'username': 'test_user',
'email': 'test_user@example.com',
'password': 'long_password',
'password': 'Password1234',
'name': 'Test User',
'honor_code': True,
'terms_of_service': True
@@ -319,7 +319,7 @@ class EmailChangeRequestTests(EventTestMixin, EmailTemplateTagMixin, CacheIsolat
self.new_email = 'new.email@edx.org'
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 @@ class SecondaryEmailChangeRequestTests(EventTestMixin, EmailTemplateTagMixin, Ca
self.new_secondary_email = 'new.secondary.email@edx.org'
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

View File

@@ -260,7 +260,7 @@ class TestRegisterRetiredUsername(TestCase):
'username': 'username',
'email': 'foo_bar' + '@bar.com',
'name': 'foo bar',
'password': '12345678',
'password': 'Password1234',
'terms_of_service': 'true',
'honor_code': 'true',
}

View File

@@ -43,7 +43,7 @@ class UserStandingTest(TestCase):
(self.non_staff, self.non_staff_client),
(self.admin, self.admin_client),
]:
client.login(username=user.username, password='password')
client.login(username=user.username, password='Password1234')
UserStandingFactory.create(
user=self.bad_user,

View File

@@ -481,7 +481,7 @@ class IntegrationTestMixin(testutil.TestCase, test.TestCase, HelperMixin):
# The AJAX on the page will log them in:
ajax_login_response = self.client.post(
reverse('user_api_login_session', kwargs={'api_version': 'v1'}),
{'email': self.user.email, 'password': 'password'}
{'email': self.user.email, 'password': 'Password1234'}
)
assert ajax_login_response.status_code == 200
# Then the AJAX will finish the third party auth:

View File

@@ -14,7 +14,7 @@ from common.djangoapps.third_party_auth.tests import testutil
from common.djangoapps.third_party_auth.tests.utils import skip_unless_thirdpartyauth
TEST_PASSWORD = 'password'
TEST_PASSWORD = 'Password1234'
# This is necessary because cms does not implement third party auth

View File

@@ -33,7 +33,7 @@ from lms.djangoapps.instructor.access import allow_access, list_with_level
from lms.djangoapps.instructor.enrollment import enroll_email, get_email_params
from openedx.core.lib.courses import get_course_by_id
USER_PASSWORD = 'password'
USER_PASSWORD = 'Password1234'
class CcxRestApiTest(CcxTestCase, APITestCase):

View File

@@ -129,7 +129,7 @@ class TestAdminAccessCoachDashboard(CcxTestCase, LoginEnrollmentTestCase):
ccx = self.make_ccx()
ccx_key = CCXLocator.from_course_locator(self.course.id, ccx.id)
self.url = reverse('ccx_coach_dashboard', kwargs={'course_id': ccx_key})
self.TEST_PASSWORD = 'password'
self.TEST_PASSWORD = 'Password1234'
def test_staff_access_coach_dashboard(self):
"""

View File

@@ -23,7 +23,7 @@ from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, p
from ....tests.mocks import mock_order_endpoint
from ....tests.test_views import UserMixin
PASSWORD = 'password'
PASSWORD = 'Password1234'
JSON_CONTENT_TYPE = 'application/json'

View File

@@ -3,7 +3,7 @@
from common.djangoapps.student.tests.factories import UserFactory
TEST_PASSWORD = "password"
TEST_PASSWORD = "Password1234"
class UserMixin:

View File

@@ -50,7 +50,7 @@ class CourseStructureTestCase(TransformerRegistryTestMixin, ModuleStoreTestCase)
"""
super().setUp()
# Set up users.
self.password = 'password'
self.password = 'Password1234'
self.user = UserFactory.create(password=self.password)
self.staff = UserFactory.create(password=self.password, is_staff=True)
@@ -253,7 +253,7 @@ class BlockParentsMapTestCase(TransformerRegistryTestMixin, ModuleStoreTestCase)
parent_block.children.append(self.xblock_keys[i])
update_block(parent_block)
self.password = 'password'
self.password = 'Password1234'
self.student = UserFactory.create(is_staff=False, username='test_student', password=self.password)
self.staff = UserFactory.create(is_staff=True, username='test_staff', password=self.password)
CourseEnrollmentFactory.create(

View File

@@ -24,7 +24,7 @@ class WikiRedirectTestCase(EnterpriseTestConsentRequired, LoginEnrollmentTestCas
# Create two accounts
self.student = 'view@test.com'
self.instructor = 'view2@test.com'
self.password = 'password'
self.password = 'Password1234'
for username, email in [('u1', self.student), ('u2', self.instructor)]:
self.create_account(username, email, self.password)
self.activate_user(email)

View File

@@ -173,7 +173,7 @@ class LoginEnrollmentTestCase(TestCase):
Create a user account, activate, and log in.
"""
self.email = 'foo@test.com' # lint-amnesty, pylint: disable=attribute-defined-outside-init
self.password = 'password' # lint-amnesty, pylint: disable=attribute-defined-outside-init
self.password = 'Password1234' # lint-amnesty, pylint: disable=attribute-defined-outside-init
self.username = 'test' # lint-amnesty, pylint: disable=attribute-defined-outside-init
self.user = self.create_account(
self.username,

View File

@@ -284,7 +284,7 @@ class AboutWithCappedEnrollmentsTestCase(LoginEnrollmentTestCase, SharedModuleSt
# pylint: disable=attribute-defined-outside-init
# create a new account since the first account is already enrolled in the course
self.email = 'foo_second@test.com'
self.password = 'password'
self.password = 'Password1234'
self.username = 'test_second'
self.create_account(self.username, self.email, self.password)
self.activate_user(self.email)

View File

@@ -22,7 +22,7 @@ class SurveyViewsTests(LoginEnrollmentTestCase, SharedModuleStoreTestCase, XssTe
"""
All tests for the views.py file
"""
STUDENT_INFO = [('view@test.com', 'password1234')]
STUDENT_INFO = [('view@test.com', 'Password1234')]
@classmethod
def setUpClass(cls):

View File

@@ -154,7 +154,7 @@ class TestSubmittingProblems(ModuleStoreTestCase, LoginEnrollmentTestCase, Probl
# create a test student
self.course = CourseFactory.create(display_name=self.COURSE_NAME, number=self.COURSE_SLUG)
self.student = 'view@test.com'
self.password = 'password'
self.password = 'Password1234'
self.create_account('u1', self.student, self.password)
self.activate_user(self.student)
self.enroll(self.course)

View File

@@ -29,7 +29,7 @@ class TestViewAuth(EnterpriseTestConsentRequired, ModuleStoreTestCase, LoginEnro
Check that view authentication works properly.
"""
ACCOUNT_INFO = [('view@test.com', 'password1234'), ('view2@test.com', 'password1234')]
ACCOUNT_INFO = [('view@test.com', 'Password1234'), ('view2@test.com', 'Password1234')]
ENABLED_SIGNALS = ['course_published']
@staticmethod

View File

@@ -81,7 +81,7 @@ class RenderXBlockTestMixin(MasqueradeMixin, metaclass=ABCMeta):
"""
Logs in the test user.
"""
self.client.login(username=self.user.username, password='password')
self.client.login(username=self.user.username, password='Password1234')
def course_options(self):
"""

View File

@@ -241,7 +241,7 @@ class ViewsTestCaseMixin:
with patch('common.djangoapps.student.models.user.cc.User.save'):
uname = 'student'
email = 'student@edx.org'
self.password = 'password'
self.password = 'Password1234'
# Create the user and make them active so we can log them in.
self.student = UserFactory.create(username=uname, email=email, password=self.password)
@@ -464,7 +464,7 @@ class ViewsTestCase(
with patch('common.djangoapps.student.models.user.cc.User.save'):
uname = 'student'
email = 'student@edx.org'
self.password = 'password'
self.password = 'Password1234'
# Create the user and make them active so we can log them in.
self.student = UserFactory.create(username=uname, email=email, password=self.password)

View File

@@ -87,7 +87,7 @@ class DiscussionAPIViewTestMixin(ForumsEnableMixin, CommentsServiceMockMixin, Ur
start=datetime.now(UTC),
discussion_topics={"Test Topic": {"id": "test_topic"}}
)
self.password = "password"
self.password = "Password1234"
self.user = UserFactory.create(password=self.password)
# Ensure that parental controls don't apply to this user
self.user.profile.year_of_birth = 1970
@@ -168,7 +168,7 @@ class UploadFileViewTest(ForumsEnableMixin, CommentsServiceMockMixin, UrlResetMi
content_type="image/jpeg",
),
}
self.user = UserFactory.create(password="password")
self.user = UserFactory.create(password=self.TEST_PASSWORD)
self.course = CourseFactory.create(org='a', course='b', run='c', start=datetime.now(UTC))
self.url = reverse("upload_file", kwargs={"course_id": str(self.course.id)})
@@ -176,7 +176,7 @@ class UploadFileViewTest(ForumsEnableMixin, CommentsServiceMockMixin, UrlResetMi
"""
Authenticates the test client with the example user.
"""
self.client.login(username=self.user.username, password="password")
self.client.login(username=self.user.username, password=self.TEST_PASSWORD)
def enroll_user_in_course(self):
"""
@@ -320,10 +320,10 @@ class CommentViewSetListByUserTest(
self.addCleanup(httpretty.reset)
self.addCleanup(httpretty.disable)
self.user = UserFactory.create(password="password")
self.user = UserFactory.create(password=self.TEST_PASSWORD)
self.register_get_user_response(self.user)
self.other_user = UserFactory.create(password="password")
self.other_user = UserFactory.create(password=self.TEST_PASSWORD)
self.register_get_user_response(self.other_user)
self.course = CourseFactory.create(org="a", course="b", run="c", start=datetime.now(UTC))
@@ -405,7 +405,7 @@ class CommentViewSetListByUserTest(
they're not either enrolled or staff members.
"""
self.register_mock_endpoints()
self.client.login(username=self.other_user.username, password="password")
self.client.login(username=self.other_user.username, password=self.TEST_PASSWORD)
response = self.client.get(self.url)
assert response.status_code == status.HTTP_404_NOT_FOUND
assert json.loads(response.content)["developer_message"] == "Course not found."
@@ -416,7 +416,7 @@ class CommentViewSetListByUserTest(
comments in that course.
"""
self.register_mock_endpoints()
self.client.login(username=self.other_user.username, password="password")
self.client.login(username=self.other_user.username, password=self.TEST_PASSWORD)
CourseEnrollmentFactory.create(user=self.other_user, course_id=self.course.id)
self.assert_successful_response(self.client.get(self.url))
@@ -425,7 +425,7 @@ class CommentViewSetListByUserTest(
Staff users are allowed to get any user's comments.
"""
self.register_mock_endpoints()
self.client.login(username=self.other_user.username, password="password")
self.client.login(username=self.other_user.username, password=self.TEST_PASSWORD)
GlobalStaff().add_users(self.other_user)
self.assert_successful_response(self.client.get(self.url))
@@ -436,7 +436,7 @@ class CommentViewSetListByUserTest(
course.
"""
self.register_mock_endpoints()
self.client.login(username=self.other_user.username, password="password")
self.client.login(username=self.other_user.username, password=self.TEST_PASSWORD)
role(course_key=self.course.id).add_users(self.other_user)
self.assert_successful_response(self.client.get(self.url))
@@ -445,7 +445,7 @@ class CommentViewSetListByUserTest(
Requests for users that don't exist result in a 404 response.
"""
self.register_mock_endpoints()
self.client.login(username=self.other_user.username, password="password")
self.client.login(username=self.other_user.username, password=self.TEST_PASSWORD)
GlobalStaff().add_users(self.other_user)
url = self.build_url("non_existent", self.course.id)
response = self.client.get(url)
@@ -456,7 +456,7 @@ class CommentViewSetListByUserTest(
Requests for courses that don't exist result in a 404 response.
"""
self.register_mock_endpoints()
self.client.login(username=self.other_user.username, password="password")
self.client.login(username=self.other_user.username, password=self.TEST_PASSWORD)
GlobalStaff().add_users(self.other_user)
url = self.build_url(self.user.username, "course-v1:x+y+z")
response = self.client.get(url)
@@ -467,7 +467,7 @@ class CommentViewSetListByUserTest(
Requests with invalid course ID should fail form validation.
"""
self.register_mock_endpoints()
self.client.login(username=self.other_user.username, password="password")
self.client.login(username=self.other_user.username, password=self.TEST_PASSWORD)
GlobalStaff().add_users(self.other_user)
url = self.build_url(self.user.username, "an invalid course")
response = self.client.get(url)
@@ -484,7 +484,7 @@ class CommentViewSetListByUserTest(
self.register_get_threads_response(threads=[], page=1, num_pages=1)
self.register_get_comments_response(comments=[], page=1, num_pages=1)
self.client.login(username=self.other_user.username, password="password")
self.client.login(username=self.other_user.username, password=self.TEST_PASSWORD)
GlobalStaff().add_users(self.other_user)
url = self.build_url(self.user.username, self.course.id, page=2)
response = self.client.get(url)
@@ -929,7 +929,7 @@ class CourseTopicsViewV3Test(DiscussionAPIViewTestMixin, CommentsServiceMockMixi
"""
def setUp(self) -> None:
super().setUp()
self.password = "password"
self.password = self.TEST_PASSWORD
self.user = UserFactory.create(password=self.password)
self.client.login(username=self.user.username, password=self.password)
self.staff = AdminFactory.create()
@@ -2758,7 +2758,7 @@ class CourseDiscussionSettingsAPIViewTest(APITestCase, UrlResetMixin, ModuleStor
discussion_topics={"Test Topic": {"id": "test_topic"}}
)
self.path = reverse('discussion_course_settings', kwargs={'course_id': str(self.course.id)})
self.password = 'password'
self.password = self.TEST_PASSWORD
self.user = UserFactory(username='staff', password=self.password, is_staff=True)
def _get_oauth_headers(self, user):
@@ -3056,7 +3056,7 @@ class CourseDiscussionRolesAPIViewTest(APITestCase, UrlResetMixin, ModuleStoreTe
run="z",
start=datetime.now(UTC),
)
self.password = 'password'
self.password = self.TEST_PASSWORD
self.user = UserFactory(username='staff', password=self.password, is_staff=True)
course_key = CourseKey.from_string('course-v1:x+y+z')
seed_permissions_roles(course_key)
@@ -3264,7 +3264,7 @@ class CourseActivityStatsTest(ForumsEnableMixin, UrlResetMixin, CommentsServiceM
user = UserFactory.create(
username=stat['username'],
email=f"{stat['username']}@example.com",
password='12345'
password=self.TEST_PASSWORD
)
CourseEnrollment.enroll(user, self.course.id, mode='audit')

View File

@@ -97,7 +97,7 @@ class GradeViewTestMixin(SharedModuleStoreTestCase):
def setUp(self):
super().setUp()
self.password = 'password'
self.password = self.TEST_PASSWORD
self.global_staff = GlobalStaffFactory.create()
self.student = UserFactory(password=self.password, username='student', email='student@example.com')
self.other_student = UserFactory(

View File

@@ -548,7 +548,7 @@ class CourseSubmissionHistoryWithDataTest(TestSubmittingProblems):
def setUp(self):
super().setUp()
self.namespaced_url = 'grades_api:v1:submission_history'
self.password = 'password'
self.password = 'Password1234'
self.basic_setup()
self.global_staff = GlobalStaffFactory.create()

View File

@@ -26,7 +26,7 @@ class TestRecommendationsBase(APITestCase):
def setUp(self):
super().setUp()
self.TEST_PASSWORD = 'password'
self.TEST_PASSWORD = 'Password1234'
self.user = UserFactory(password=self.TEST_PASSWORD)
self.client.login(username=self.user.username, password=self.TEST_PASSWORD)
self.recommended_courses = [
@@ -164,7 +164,7 @@ class TestRecommendationsContextView(APITestCase):
def setUp(self):
super().setUp()
self.user = UserFactory()
self.password = "password"
self.password = 'Password1234'
self.url = reverse_lazy("learner_recommendations:recommendations_context")
@mock.patch("lms.djangoapps.learner_recommendations.views.country_code_from_ip")
@@ -370,7 +370,7 @@ class TestProductRecommendationsView(APITestCase):
def setUp(self):
super().setUp()
self.TEST_PASSWORD = 'password'
self.TEST_PASSWORD = 'Password1234'
self.user = UserFactory(password=self.TEST_PASSWORD)
self.client.login(username=self.user.username, password=self.TEST_PASSWORD)
self.associated_course_keys = ["edx+HL1", "edx+HL2"]

View File

@@ -50,7 +50,7 @@ class MobileAPITestCase(ModuleStoreTestCase, APITestCase):
certificate_available_date=datetime.datetime.now(pytz.UTC)
)
self.user = UserFactory.create()
self.password = 'password'
self.password = 'Password1234'
self.username = self.user.username
self.api_version = API_V1
IgnoreMobileAvailableFlagConfig(enabled=False).save()

View File

@@ -30,7 +30,7 @@ class SurveyModelsTests(TestCase):
self.client = Client()
# Create two accounts
self.password = 'password'
self.password = 'Password1234'
self.student = UserFactory.create(
username='student', email='student@test.com', password=self.password,
)

View File

@@ -28,7 +28,7 @@ class SurveyModelsTests(ModuleStoreTestCase):
self.client = Client()
# Create two accounts
self.password = 'password'
self.password = 'Password1234'
self.student = UserFactory.create(
username='student', email='student@test.com', password=self.password,
)

View File

@@ -29,7 +29,7 @@ class SurveyViewsTests(ModuleStoreTestCase):
self.client = Client()
# Create two accounts
self.password = 'password'
self.password = 'Password1234'
self.student = UserFactory.create(username='student', email='student@test.com', password=self.password)
self.test_survey_name = 'TestSurvey'

View File

@@ -122,8 +122,8 @@ class StartView(TestCase):
Test the case where the user has no pending `PhotoVerificationAttempts`,
but is just starting their first.
"""
UserFactory.create(username="rusty", password="password")
self.client.login(username="rusty", password="password")
UserFactory.create(username="rusty", password='Password1234')
self.client.login(username="rusty", password='Password1234')
def must_be_logged_in(self):
self.assertHttpForbidden(self.client.get(self.start_url())) # lint-amnesty, pylint: disable=no-member
@@ -1055,11 +1055,11 @@ class CheckoutTestMixin:
""" Create a user and course. """
super().setUp()
self.user = UserFactory.create(username="test", password="password")
self.user = UserFactory.create(username="test", password='Password1234')
self.course = CourseFactory.create()
for mode, min_price in (('audit', 0), ('honor', 0), ('verified', 100)):
CourseModeFactory.create(mode_slug=mode, course_id=self.course.id, min_price=min_price, sku=self.make_sku())
self.client.login(username="test", password="password")
self.client.login(username="test", password='Password1234')
def _assert_checked_out(
self,
@@ -1868,7 +1868,7 @@ class TestPhotoURLView(TestVerificationBase):
super().setUp()
self.user = AdminFactory()
login_success = self.client.login(username=self.user.username, password='password')
login_success = self.client.login(username=self.user.username, password='Password1234')
assert login_success
self.attempt = SoftwareSecurePhotoVerification(
status="submitted",
@@ -1895,7 +1895,7 @@ class TestPhotoURLView(TestVerificationBase):
def test_403_for_non_staff(self):
self.user = UserFactory()
login_success = self.client.login(username=self.user.username, password='password')
login_success = self.client.login(username=self.user.username, password='Password1234')
assert login_success
url = reverse('verification_photo_urls', kwargs={'receipt_id': str(self.receipt_id)})
response = self.client.get(url)
@@ -1934,7 +1934,7 @@ class TestDecodeImageViews(MockS3Boto3Mixin, TestVerificationBase):
def setUp(self):
super().setUp()
self.user = AdminFactory()
login_success = self.client.login(username=self.user.username, password='password')
login_success = self.client.login(username=self.user.username, password='Password1234')
assert login_success
def _mock_submit_images(self):
@@ -1995,7 +1995,7 @@ class TestDecodeImageViews(MockS3Boto3Mixin, TestVerificationBase):
@ddt.data("face", "photo_id")
def test_403_for_non_staff(self, img_type):
self.user = UserFactory()
login_success = self.client.login(username=self.user.username, password='password')
login_success = self.client.login(username=self.user.username, password='Password1234')
assert login_success
self._mock_submit_images()

View File

@@ -319,7 +319,7 @@ class NotificationListAPIViewTest(APITestCase):
"""
def setUp(self):
self.TEST_PASSWORD = "password"
self.TEST_PASSWORD = 'Password1234'
self.user = UserFactory(password=self.TEST_PASSWORD)
self.url = reverse('notifications-list')
@@ -569,7 +569,7 @@ class MarkNotificationsSeenAPIViewTestCase(APITestCase):
"""
def setUp(self):
self.TEST_PASSWORD = "password"
self.TEST_PASSWORD = 'Password1234'
self.user = UserFactory(password=self.TEST_PASSWORD)
# Create some sample notifications for the user
@@ -602,7 +602,7 @@ class NotificationReadAPIViewTestCase(APITestCase):
"""
def setUp(self):
self.TEST_PASSWORD = "password"
self.TEST_PASSWORD = 'Password1234'
self.user = UserFactory(password=self.TEST_PASSWORD)
self.url = reverse('notifications-read')
self.client.login(username=self.user.username, password=self.TEST_PASSWORD)

View File

@@ -31,7 +31,7 @@ class AuthenticateTestCase(TestCase):
def setUp(self):
super().setUp()
self.TEST_PASSWORD = 'password'
self.TEST_PASSWORD = 'Password1234'
self.user = UserFactory.create(
username='darkhelmet',
password=self.TEST_PASSWORD,
@@ -57,7 +57,7 @@ class CustomValidationTestCase(TestCase):
"""
def setUp(self):
super().setUp()
self.TEST_PASSWORD = "password"
self.TEST_PASSWORD = 'Password1234'
self.user = UserFactory.create(
username='darkhelmet',
password=self.TEST_PASSWORD,
@@ -89,7 +89,7 @@ class CustomAuthorizationViewTestCase(TestCase):
"""
def setUp(self):
super().setUp()
self.TEST_PASSWORD = 'password'
self.TEST_PASSWORD = 'Password1234'
self.dot_adapter = adapters.DOTAdapter()
self.user = UserFactory(password=self.TEST_PASSWORD)
self.client.login(username=self.user.username, password=self.TEST_PASSWORD)

View File

@@ -86,7 +86,7 @@ class _DispatchingViewTestCase(TestCase):
"""
def setUp(self):
super().setUp()
self.TEST_PASSWORD = "password"
self.TEST_PASSWORD = 'Password1234'
self.dot_adapter = adapters.DOTAdapter()
self.user = UserFactory(password=self.TEST_PASSWORD)
self.dot_app = self.dot_adapter.create_public_client(

View File

@@ -36,7 +36,7 @@ class TestSafeSessionProcessRequest(TestSafeSessionsLogMixin, TestCase):
self.user = UserFactory.create()
self.addCleanup(set_current_request, None)
self.request = get_mock_request()
self.TEST_PASSWORD = 'password'
self.TEST_PASSWORD = 'Password1234'
def assert_response(self, safe_cookie_data=None, success=True):
"""
@@ -251,7 +251,7 @@ class TestSafeSessionMiddleware(TestSafeSessionsLogMixin, CacheIsolationTestCase
def setUp(self):
super().setUp()
self.TEST_PASSWORD = 'password'
self.TEST_PASSWORD = 'Password1234'
self.user = UserFactory.create(password=self.TEST_PASSWORD)
self.addCleanup(set_current_request, None)
self.request = get_mock_request()

View File

@@ -24,7 +24,7 @@ class TestComprehensiveThemeLMS(TestCase):
Clear static file finders cache and register cleanup methods.
"""
super().setUp()
self.TEST_PASSWORD = 'password'
self.TEST_PASSWORD = 'Password1234'
self.user = UserFactory(password=self.TEST_PASSWORD)
# Clear the internal staticfiles caches, to get test isolation.

View File

@@ -13,7 +13,7 @@ from openedx.core.djangoapps.theming.models import SiteTheme
THEMING_ADMIN_URL = '/theming/admin'
TEST_THEME_NAME = 'test-theme'
TEST_PASSWORD = 'password'
TEST_PASSWORD = 'Password1234'
class TestThemingViews(TestCase):

View File

@@ -88,7 +88,7 @@ class TestAccountApi(UserSettingsEventTestMixin, EmailTemplateTagMixin, CreateAc
This includes the specific types of error raised, and default behavior when optional arguments
are not specified.
"""
password = "password"
password = 'Password1234'
def setUp(self):
super().setUp()

View File

@@ -33,7 +33,7 @@ class UserAPITestCase(ApiTestCase):
Parent test case for User API workflow coverage
"""
LIST_URI = USER_LIST_URI
TEST_PASSWORD = "password"
TEST_PASSWORD = 'Password1234'
def get_uri_for_user(self, target_user):
"""Given a user object, get the URI for the corresponding resource"""

View File

@@ -23,7 +23,7 @@ class VerificationViewTestsMixinBase:
""" Base class for the tests on verification views """
VIEW_NAME = None
CREATED_AT = datetime.datetime.strptime(FROZEN_TIME, '%Y-%m-%d')
PASSWORD = 'password'
PASSWORD = 'Password1234'
def setUp(self):
freezer = freezegun.freeze_time(FROZEN_TIME)

View File

@@ -58,7 +58,7 @@ class AuthAndScopesTestMixin:
self.student.
"""
default_scopes = None
user_password = 'password'
user_password = 'Password1234'
def setUp(self):
super().setUp()

View File

@@ -192,11 +192,11 @@ class TestPasswordChange(CreateAccountMixin, CacheIsolationTestCase):
UserFactory.create(
username='edx',
email='edx@example.com',
password='password',
password='Password1234',
is_superuser=is_superuser,
is_staff=is_staff,
)
self.client.login(username='edx', password='password')
self.client.login(username='edx', password='Password1234')
response = self._change_password_from_support(email_from_support_tools=self.OLD_EMAIL)
assert response.status_code == 200

View File

@@ -20,7 +20,7 @@ from xmodule.modulestore.tests.factories import CourseFactory # lint-amnesty, p
from .helpers import add_course_mode
TEST_PASSWORD = 'password'
TEST_PASSWORD = 'Password1234'
TEST_VERIFICATION_SOCK_LOCATOR = '<div class="verification-sock"'

View File

@@ -17,7 +17,7 @@ from xmodule.partitions.partitions_service import PartitionService # lint-amnes
from .helpers import add_course_mode
from .test_course_sock import TEST_VERIFICATION_SOCK_LOCATOR
TEST_PASSWORD = 'password'
TEST_PASSWORD = 'Password1234'
class MasqueradeTestBase(SharedModuleStoreTestCase, MasqueradeMixin):

View File

@@ -21,8 +21,8 @@ class TestCrowdsourceHinter(SharedModuleStoreTestCase, LoginEnrollmentTestCase):
Create the test environment with the crowdsourcehinter xblock.
"""
STUDENTS = [
{'email': 'view@test.com', 'password': 'password1234'},
{'email': 'view2@test.com', 'password': 'password1234'}
{'email': 'view@test.com', 'password': 'Password1234'},
{'email': 'view2@test.com', 'password': 'Password1234'}
]
XBLOCK_NAMES = ['crowdsourcehinter']

View File

@@ -27,8 +27,8 @@ class TestRecommender(SharedModuleStoreTestCase, LoginEnrollmentTestCase):
Check that Recommender state is saved properly
"""
STUDENTS = [
{'email': 'view@test.com', 'password': 'password1234'},
{'email': 'view2@test.com', 'password': 'password1234'}
{'email': 'view@test.com', 'password': 'Password1234'},
{'email': 'view2@test.com', 'password': 'Password1234'}
]
XBLOCK_NAMES = ['recommender', 'recommender_second']

View File

@@ -282,9 +282,9 @@ class XBlockStudentTestCaseMixin:
Creates a default set of students for XBlock tests
'''
student_list = [
{'email': 'alice@test.edx.org', 'password': 'password1234'},
{'email': 'bob@test.edx.org', 'password': 'password1234'},
{'email': 'eve@test.edx.org', 'password': 'password1234'},
{'email': 'alice@test.edx.org', 'password': 'Password1234'},
{'email': 'bob@test.edx.org', 'password': 'Password1234'},
{'email': 'eve@test.edx.org', 'password': 'Password1234'},
]
def setUp(self):

View File

@@ -369,7 +369,7 @@ class ModuleStoreTestUsersMixin():
"""
A mixin to help manage test users.
"""
TEST_PASSWORD = 'password'
TEST_PASSWORD = 'Password1234'
def create_user_for_course(self, course, user_type=CourseUserType.ENROLLED):
"""