Commit 5521f053 by Waheed Ahmed

Fixed flaky test.

LEARNER-1025
parent 91b7a255
...@@ -1200,8 +1200,8 @@ class DashboardTests(TestCase): ...@@ -1200,8 +1200,8 @@ class DashboardTests(TestCase):
# admin user can see all courses. # admin user can see all courses.
def _create_course_assign_role(self, state, user, role): def _create_course_assign_role(self, state, user, role):
""" DRY method to create course and assign the permissions""" """ Create course-run-state, course-user-role and return course-run. """
course_run_state = factories.CourseRunStateFactory(name=state) course_run_state = factories.CourseRunStateFactory(name=state, owner_role=role)
factories.CourseUserRoleFactory(course=course_run_state.course_run.course, role=role, user=user) factories.CourseUserRoleFactory(course=course_run_state.course_run.course, role=role, user=user)
return course_run_state.course_run return course_run_state.course_run
......
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