'test to check that reason field should not be empty when
manually enrolling the students for the paid courses.'

def test_reason_field_should_not_be_empty(self):

    paid_course = self.create_paid_course()
    url = reverse('students_update_enrollment', kwargs={'course_id': paid_course.id.to_deprecated_string()})
    params = {'identifiers': self.notregistered_email, 'action': 'enroll', 'email_students': False, 'auto_enroll': False}
    response = self.client.post(url, params)
    manual_enrollments = ManualEnrollmentAudit.objects.all()
    self.assertEqual(manual_enrollments.count(), 0)
    expected = {'action': 'enroll', 'auto_enroll': False, 'results': [{'error': True}]}
    res_json = json.loads(response.content)
    self.assertEqual(res_json, expected)
