'test generate enrollment report
enroll a user in a course using registration code
whose invoice has not been paid yet'

def test_invoice_payment_is_still_pending_for_registration_codes(self):

    course_registration_code = CourseRegistrationCode.objects.create(code='abcde', course_id=self.course.id.to_deprecated_string(), created_by=self.instructor, invoice=self.sale_invoice_1, invoice_item=self.invoice_item, mode_slug='honor')
    test_user1 = UserFactory()
    self.register_with_redemption_code(test_user1, course_registration_code.code)
    CourseFinanceAdminRole(self.course.id).add_users(self.instructor)
    self.client.login(username=self.instructor.username, password='test')
    url = reverse('get_enrollment_report', kwargs={'course_id': self.course.id.to_deprecated_string()})
    response = self.client.post(url, {})
    self.assertIn('The    detailed    enrollment    report    is    being    created.', response.content)
