-
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.
test: Update to reuse variables in more places.
Some of the places where we had explicit copies of the password were not necessary so we referece the exsting TEST_PASSWORD variable where possible.
- Loading branch information
Showing
11 changed files
with
22 additions
and
20 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
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 = 'Password1234' | ||
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
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 |
---|---|---|
|
@@ -24,7 +24,7 @@ def setUp(self): | |
# Create two accounts | ||
self.student = '[email protected]' | ||
self.instructor = '[email protected]' | ||
self.password = 'Password1234' | ||
self.password = self.TEST_PASSWORD | ||
for username, email in [('u1', self.student), ('u2', self.instructor)]: | ||
self.create_account(username, email, self.password) | ||
self.activate_user(email) | ||
|
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 |
---|---|---|
|
@@ -154,7 +154,7 @@ def setUp(self): | |
# create a test student | ||
self.course = CourseFactory.create(display_name=self.COURSE_NAME, number=self.COURSE_SLUG) | ||
self.student = '[email protected]' | ||
self.password = 'Password1234' | ||
self.password = self.TEST_PASSWORD | ||
self.create_account('u1', self.student, self.password) | ||
self.activate_user(self.student) | ||
self.enroll(self.course) | ||
|
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 |
---|---|---|
|
@@ -28,7 +28,7 @@ def setUp(self): | |
self.client = Client() | ||
|
||
# Create two accounts | ||
self.password = 'Password1234' | ||
self.password = self.TEST_PASSWORD | ||
self.student = UserFactory.create( | ||
username='student', email='[email protected]', 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ def setUp(self): | |
self.client = Client() | ||
|
||
# Create two accounts | ||
self.password = 'Password1234' | ||
self.password = self.TEST_PASSWORD | ||
self.student = UserFactory.create(username='student', email='[email protected]', password=self.password) | ||
|
||
self.test_survey_name = 'TestSurvey' | ||
|
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 |
---|---|---|
|
@@ -21,8 +21,8 @@ class TestCrowdsourceHinter(SharedModuleStoreTestCase, LoginEnrollmentTestCase): | |
Create the test environment with the crowdsourcehinter xblock. | ||
""" | ||
STUDENTS = [ | ||
{'email': '[email protected]', 'password': 'Password1234'}, | ||
{'email': '[email protected]', 'password': 'Password1234'} | ||
{'email': '[email protected]', 'password': SharedModuleStoreTestCase.TEST_PASSWORD}, | ||
{'email': '[email protected]', 'password': SharedModuleStoreTestCase.TEST_PASSWORD} | ||
] | ||
XBLOCK_NAMES = ['crowdsourcehinter'] | ||
|
||
|