Change cohort tests to not use an invalid username

This commit is contained in:
Greg Price
2015-02-13 15:57:11 -05:00
parent ef85cb4b18
commit ad86ef3bd8
5 changed files with 9 additions and 9 deletions

View File

@@ -51,9 +51,9 @@ class CohortConfigurationTest(UniqueCourseTest, CohortTestMixin):
).visit().get_user_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
self.unicode_student_id = AutoAuthPage(
self.browser, username="Ωπ", email="unicode_student_user@example.com",
# create a second student user
self.other_student_id = AutoAuthPage(
self.browser, username="other_student_user", email="other_student_user@example.com",
course_id=self.course_id, staff=False
).visit().get_user_id()
@@ -389,12 +389,12 @@ class CohortConfigurationTest(UniqueCourseTest, CohortTestMixin):
}).count(),
1
)
# unicode_student_user (previously unassigned) is added to manual cohort
# other_student_user (previously unassigned) is added to manual cohort
self.assertEqual(
self.event_collection.find({
"name": "edx.cohort.user_added",
"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,
}).count(),
1

View File

@@ -47,7 +47,7 @@ class EndToEndCohortedCoursewareTest(ContainerBase):
).visit()
# 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"
StudioAutoAuthPage(
self.browser, username=self.cohort_default_student_username,

View File

@@ -1,4 +1,4 @@
username,email,ignored_column,cohort
instructor_user,,June,ManualCohort1
,student_user@example.com,Spring,AutoCohort1
Ωπ,,Fall,ManualCohort1
other_student_user,,Fall,ManualCohort1
1 username email ignored_column cohort
2 instructor_user June ManualCohort1
3 student_user@example.com Spring AutoCohort1
4 Ωπ other_student_user Fall ManualCohort1

View File

@@ -1,5 +1,5 @@
email,cohort
instructor_user@example.com,ManualCohort1
student_user@example.com,AutoCohort1
unicode_student_user@example.com,ManualCohort1
other_student_user@example.com,ManualCohort1
1 email cohort
2 instructor_user@example.com ManualCohort1
3 student_user@example.com AutoCohort1
4 unicode_student_user@example.com other_student_user@example.com ManualCohort1
5

View File

@@ -1,4 +1,4 @@
username,cohort
instructor_user,ManualCohort1
student_user,AutoCohort1
Ωπ,ManualCohort1
other_student_user,ManualCohort1
1 username cohort
2 instructor_user ManualCohort1
3 student_user AutoCohort1
4 Ωπ other_student_user ManualCohort1