'Happy path test to create a single new user'

@patch('lms.djangoapps.instructor.views.api.log.info')
def test_account_creation_and_enrollment_with_csv(self, info_log):

    csv_content = 'test_student@example.com,test_student_1,tester1,USA'
    uploaded_file = SimpleUploadedFile('temp.csv', csv_content)
    response = self.client.post(self.url, {'students_list': uploaded_file})
    self.assertEqual(response.status_code, 200)
    data = json.loads(response.content)
    self.assertEquals(len(data['row_errors']), 0)
    self.assertEquals(len(data['warnings']), 0)
    self.assertEquals(len(data['general_errors']), 0)
    manual_enrollments = ManualEnrollmentAudit.objects.all()
    self.assertEqual(manual_enrollments.count(), 1)
    self.assertEqual(manual_enrollments[0].state_transition, UNENROLLED_TO_ENROLLED)
    info_log.assert_called_with('email    sent    to    new    created    user    at    %s', 'test_student@example.com')
