'If the username already exists (but not the email),
assume it is a different user and fail to create the new account.'

def test_user_with_already_existing_username_in_csv(self):

    csv_content = 'test_student1@example.com,test_student_1,tester1,USA\ntest_student2@example.com,test_student_1,tester2,US'
    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.assertNotEquals(len(data['row_errors']), 0)
    self.assertEquals(data['row_errors'][0]['response'], 'Username    {user}    already    exists.'.format(user='test_student_1'))
