diff --git a/edx_exams/apps/core/management/commands/test/test_bulk_add_course_staff.py b/edx_exams/apps/core/management/commands/test/test_bulk_add_course_staff.py index 10fa403a..6f63ac16 100644 --- a/edx_exams/apps/core/management/commands/test/test_bulk_add_course_staff.py +++ b/edx_exams/apps/core/management/commands/test/test_bulk_add_course_staff.py @@ -121,10 +121,10 @@ def test_num_queries_correct(self): def test_dupe_user_csv(self): """ Assert that the course staff roles are correctly created given duplicate users in csv """ username, email = 'pam', 'pam@pond.com' - lines = [f'{username},{email},{self.course_role},{self.course_id}\n', - f'{username},{email},{self.course_role},{self.course_id}\n'] course_id_2 = 'course-v1:edx+test+f21' - + lines = [f'{username},{email},{self.course_role},{self.course_id}\n', + f'{username},{email},{self.course_role},{course_id_2}\n'] + with NamedTemporaryFile() as csv: csv = self._write_test_csv(csv, lines) call_command(self.command, f'--csv_path={csv.name}')