def METHOD_NAME(self, rows, get_by_user_id):
    get_by_user_id.return_value = WebUser(
        _id=self.couch_user_id, domain=self.domain, username='lalala@example.com')
    case_upload_record = CaseUploadRecord(
        upload_id=uuid.uuid4(),
        task_id=uuid.uuid4(),
        domain=self.domain,
    )
    case_upload_record.save()
    self.addCleanup(case_upload_record.delete)
    tracker = CaseUpload(case_upload_record.upload_id)
    # mock internals to have record_cases use our case_upload_record
    tracker.__dict__['_case_upload_record'] = case_upload_record
    config = self._get_config(rows[0])
    xls_file = make_worksheet_wrapper(*rows)
    do_import(xls_file, config, self.domain,
              record_form_callback=tracker.record_form)
    return case_upload_record