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

def test_bad_file_upload_type(self):

    uploaded_file = SimpleUploadedFile('temp.csv', 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'], 'Could    not    read    uploaded    file.')
    manual_enrollments = ManualEnrollmentAudit.objects.all()
    self.assertEqual(manual_enrollments.count(), 0)
