'test to generate enrollment report.
enroll users, admin staff using registration codes.'

def test_enrollment_report_features_csv(self):

    InvoiceTransaction.objects.create(invoice=self.sale_invoice_1, amount=self.sale_invoice_1.total_amount, status='completed', created_by=self.instructor, last_modified_by=self.instructor)
    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')
    admin_user = AdminFactory()
    admin_cart = Order.get_cart_for_user(admin_user)
    PaidCourseRegistration.add_to_order(admin_cart, self.course.id)
    admin_cart.purchase()
    test_user = UserFactory()
    self.register_with_redemption_code(test_user, course_registration_code.code)
    CourseFinanceAdminRole(self.course.id).add_users(self.instructor)
    UserProfileFactory.create(user=self.students[0], meta='{"company":    "asdasda"}')
    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)
