Commit ad86ef3b by Greg Price

Change cohort tests to not use an invalid username

parent ef85cb4b
...@@ -51,9 +51,9 @@ class CohortConfigurationTest(UniqueCourseTest, CohortTestMixin): ...@@ -51,9 +51,9 @@ class CohortConfigurationTest(UniqueCourseTest, CohortTestMixin):
).visit().get_user_id() ).visit().get_user_id()
self.add_user_to_cohort(self.course_fixture, self.student_name, self.manual_cohort_id) self.add_user_to_cohort(self.course_fixture, self.student_name, self.manual_cohort_id)
# create a user with unicode characters in their username # create a second student user
self.unicode_student_id = AutoAuthPage( self.other_student_id = AutoAuthPage(
self.browser, username="Ωπ", email="unicode_student_user@example.com", self.browser, username="other_student_user", email="other_student_user@example.com",
course_id=self.course_id, staff=False course_id=self.course_id, staff=False
).visit().get_user_id() ).visit().get_user_id()
...@@ -389,12 +389,12 @@ class CohortConfigurationTest(UniqueCourseTest, CohortTestMixin): ...@@ -389,12 +389,12 @@ class CohortConfigurationTest(UniqueCourseTest, CohortTestMixin):
}).count(), }).count(),
1 1
) )
# unicode_student_user (previously unassigned) is added to manual cohort # other_student_user (previously unassigned) is added to manual cohort
self.assertEqual( self.assertEqual(
self.event_collection.find({ self.event_collection.find({
"name": "edx.cohort.user_added", "name": "edx.cohort.user_added",
"time": {"$gt": start_time}, "time": {"$gt": start_time},
"event.user_id": {"$in": [int(self.unicode_student_id)]}, "event.user_id": {"$in": [int(self.other_student_id)]},
"event.cohort_name": self.manual_cohort_name, "event.cohort_name": self.manual_cohort_name,
}).count(), }).count(),
1 1
......
...@@ -47,7 +47,7 @@ class EndToEndCohortedCoursewareTest(ContainerBase): ...@@ -47,7 +47,7 @@ class EndToEndCohortedCoursewareTest(ContainerBase):
).visit() ).visit()
# Create a student who will end up in the default cohort group # Create a student who will end up in the default cohort group
self.cohort_default_student_username = "cohort default student" self.cohort_default_student_username = "cohort_default_student"
self.cohort_default_student_email = "cohort_default_student@example.com" self.cohort_default_student_email = "cohort_default_student@example.com"
StudioAutoAuthPage( StudioAutoAuthPage(
self.browser, username=self.cohort_default_student_username, self.browser, username=self.cohort_default_student_username,
......
username,email,ignored_column,cohort username,email,ignored_column,cohort
instructor_user,,June,ManualCohort1 instructor_user,,June,ManualCohort1
,student_user@example.com,Spring,AutoCohort1 ,student_user@example.com,Spring,AutoCohort1
Ωπ,,Fall,ManualCohort1 other_student_user,,Fall,ManualCohort1
email,cohort email,cohort
instructor_user@example.com,ManualCohort1 instructor_user@example.com,ManualCohort1
student_user@example.com,AutoCohort1 student_user@example.com,AutoCohort1
unicode_student_user@example.com,ManualCohort1 other_student_user@example.com,ManualCohort1
username,cohort username,cohort
instructor_user,ManualCohort1 instructor_user,ManualCohort1
student_user,AutoCohort1 student_user,AutoCohort1
Ωπ,ManualCohort1 other_student_user,ManualCohort1
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment