'Test that creating same course again after deleting it gives user his default
forum role "Student" for that course'

def test_user_role_on_course_recreate(self):

    self.assertTrue(CourseEnrollment.is_enrolled(self.user, self.course_key))
    self.assertTrue(self.user.roles.filter(name='Student', course_id=self.course_key))
    delete_course(self.course_key, self.user.id)
    resp = self._create_course_with_given_location(self.course_key)
    self.assertEqual(resp.status_code, 200)
    self.assertTrue(CourseEnrollment.is_enrolled(self.user, self.course_key))
    self.assertTrue(self.user.roles.filter(name='Student', course_id=self.course_key))
