'Try uploading some non-CSV file and verify that it is rejected'

def test_file_upload_type_not_csv(self):

    uploaded_file = SimpleUploadedFile('temp.jpg', io.BytesIO('some    initial    binary    data:    \x00\x01').read())
    response = self.client.post(self.url, {'students_list': uploaded_file})
    self.assertEqual(response.status_code, 200)
    data = json.loads(response.content)
    self.assertNotEquals(len(data['general_errors']), 0)
    self.assertEquals(data['general_errors'][0]['response'], 'Make    sure    that    the    file    you    upload    is    in    CSV    format    with    no    extraneous    characters    or    rows.')
    manual_enrollments = ManualEnrollmentAudit.objects.all()
    self.assertEqual(manual_enrollments.count(), 0)
