From ad86ef3bd8d5977548afc043a5075b0028ce13a8 Mon Sep 17 00:00:00 2001 From: Greg Price Date: Fri, 13 Feb 2015 15:57:11 -0500 Subject: [PATCH] Change cohort tests to not use an invalid username --- .../tests/discussion/test_cohort_management.py | 10 +++++----- .../test/acceptance/tests/test_cohorted_courseware.py | 2 +- common/test/data/uploads/cohort_users_both_columns.csv | 2 +- common/test/data/uploads/cohort_users_only_email.csv | 2 +- .../test/data/uploads/cohort_users_only_username.csv | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/common/test/acceptance/tests/discussion/test_cohort_management.py b/common/test/acceptance/tests/discussion/test_cohort_management.py index 07da9bdbfa..2a99c78c20 100644 --- a/common/test/acceptance/tests/discussion/test_cohort_management.py +++ b/common/test/acceptance/tests/discussion/test_cohort_management.py @@ -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 diff --git a/common/test/acceptance/tests/test_cohorted_courseware.py b/common/test/acceptance/tests/test_cohorted_courseware.py index b702352a6d..00f42cd14e 100644 --- a/common/test/acceptance/tests/test_cohorted_courseware.py +++ b/common/test/acceptance/tests/test_cohorted_courseware.py @@ -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, diff --git a/common/test/data/uploads/cohort_users_both_columns.csv b/common/test/data/uploads/cohort_users_both_columns.csv index eced3db09d..ee13b56c7c 100644 --- a/common/test/data/uploads/cohort_users_both_columns.csv +++ b/common/test/data/uploads/cohort_users_both_columns.csv @@ -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 diff --git a/common/test/data/uploads/cohort_users_only_email.csv b/common/test/data/uploads/cohort_users_only_email.csv index 7835d455fb..7fb6a85400 100644 --- a/common/test/data/uploads/cohort_users_only_email.csv +++ b/common/test/data/uploads/cohort_users_only_email.csv @@ -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 diff --git a/common/test/data/uploads/cohort_users_only_username.csv b/common/test/data/uploads/cohort_users_only_username.csv index 0c7588030a..f33b77a0a2 100644 --- a/common/test/data/uploads/cohort_users_only_username.csv +++ b/common/test/data/uploads/cohort_users_only_username.csv @@ -1,4 +1,4 @@ username,cohort instructor_user,ManualCohort1 student_user,AutoCohort1 -Ωπ,ManualCohort1 \ No newline at end of file +other_student_user,ManualCohort1