"No","テストID","対象クラス","対象メソッド","テスト観点","テストケース名","前提条件","入力値","期待結果","優先度","備考"
"1","UT-IMP-001","importer.models.DataImportSession","save","正常系","新規セッション作成時に初期設定が実行されること","なし","data_file=有効なCSVファイル, model_type=""company""","status=INITIAL, progress=0, extract_columnsが呼び出される","高","初期化ロジックの検証"
"2","UT-IMP-002","importer.models.DataImportSession","save","正常系","既存セッション更新時は初期設定がスキップされること","既存のDataImportSessionが存在","既存セッションを更新","extract_columnsが呼び出されない","中","更新時の挙動確認"
"3","UT-IMP-003","importer.models.DataImportSession","get_api_url","正常系","正しいAPI URLが返却されること","なし","なし","reverse('api-importer-session-list')の値が返却される","低","静的メソッド検証"
"4","UT-IMP-004","importer.models.DataImportSession","field_mapping","正常系","フィールドマッピングが正しく構築されること","column_mappingsに複数のマッピングが存在","なし","{field: column}形式の辞書が返却される","高","プロパティ検証"
"5","UT-IMP-005","importer.models.DataImportSession","field_mapping","境界値","マッピングが空の場合に空辞書が返却されること","column_mappingsが空","なし","空の辞書{}が返却される","中","境界値検証"
"6","UT-IMP-006","importer.models.DataImportSession","model_class","正常系","シリアライザからモデルクラスが取得できること","有効なmodel_typeが設定済み","model_type=""company""","Companyモデルクラスが返却される","中","プロパティ検証"
"7","UT-IMP-007","importer.models.DataImportSession","model_class","異常系","無効なmodel_typeでNoneが返却されること","無効なmodel_typeが設定済み","model_type=""invalid""","Noneが返却される","中","異常系検証"
"8","UT-IMP-008","importer.models.DataImportSession","serializer_class","正常系","サポートされたモデルのシリアライザが返却されること","有効なmodel_typeが設定済み","model_type=""company""","CompanySerializerが返却される","中","プロパティ検証"
"9","UT-IMP-009","importer.models.DataImportSession","extract_columns","正常系","CSVファイルからカラム名が抽出されること","有効なCSVファイルがアップロード済み","CSVファイル(ヘッダー:Name,Description,Active)","columns=[""Name"",""Description"",""Active""]","高","カラム抽出ロジック"
"10","UT-IMP-010","importer.models.DataImportSession","extract_columns","正常系","フィールドとカラムのマッピングが自動生成されること","有効なCSVファイルがアップロード済み","シリアライザフィールドに一致するカラム名","DataImportColumnMapオブジェクトが作成される","高","自動マッピング機能"
"11","UT-IMP-011","importer.models.DataImportSession","extract_columns","正常系","大文字小文字を無視してマッピングされること","有効なCSVファイルがアップロード済み","カラム名=""NAME""(大文字), フィールド名=""name""(小文字)","正しくマッピングされる","中","大文字小文字の無視"
"12","UT-IMP-012","importer.models.DataImportSession","extract_columns","正常系","ステータスがMAPPINGに更新されること","新規セッション","extract_columns実行","status=DataImportStatusCode.MAPPING","高","ステータス遷移"
"13","UT-IMP-013","importer.models.DataImportSession","extract_columns","正常系","field_overridesに含まれるフィールドはマッピングがスキップされること","field_overrides={""name"":""Test""}","extract_columns実行","nameフィールドのマッピングが作成されない","中","オーバーライド動作"
"14","UT-IMP-014","importer.models.DataImportSession","accept_mapping","正常系","全ての必須フィールドがマッピングされている場合にインポートが開始されること","全必須フィールドがマッピング済み","accept_mapping呼び出し","trigger_data_importが呼び出される","高","マッピング受け入れ"
"15","UT-IMP-015","importer.models.DataImportSession","accept_mapping","異常系","必須フィールドが未マッピングの場合にValidationErrorが発生すること","必須フィールドが未マッピング","accept_mapping呼び出し","ValidationError(fields=[未マッピングフィールド])","高","バリデーションエラー"
"16","UT-IMP-016","importer.models.DataImportSession","accept_mapping","正常系","デフォルト値が設定されている場合はマッピング不要であること","必須フィールドにデフォルト値が設定済み","accept_mapping呼び出し","エラーなしでインポート開始","中","デフォルト値による補完"
"17","UT-IMP-017","importer.models.DataImportSession","accept_mapping","正常系","オーバーライド値が設定されている場合はマッピング不要であること","必須フィールドにオーバーライド値が設定済み","accept_mapping呼び出し","エラーなしでインポート開始","中","オーバーライド値による補完"
"18","UT-IMP-018","importer.models.DataImportSession","trigger_data_import","正常系","ステータスがIMPORTINGに更新されること","有効なセッション","trigger_data_import呼び出し","status=DataImportStatusCode.IMPORTING","高","ステータス遷移"
"19","UT-IMP-019","importer.models.DataImportSession","trigger_data_import","正常系","バックグラウンドタスクがオフロードされること","有効なセッション","trigger_data_import呼び出し","offload_taskが呼び出される","高","非同期タスク"
"20","UT-IMP-020","importer.models.DataImportSession","import_data","正常系","データファイルからDataImportRowが作成されること","有効なCSVファイル(12行)","import_data呼び出し","12個のDataImportRowが作成される","高","データインポート"
"21","UT-IMP-021","importer.models.DataImportSession","import_data","正常系","空行がスキップされること","CSVファイルに空行を含む","import_data呼び出し","空行はDataImportRowとして作成されない","中","空行処理"
"22","UT-IMP-022","importer.models.DataImportSession","import_data","正常系","ステータスがPROCESSINGに更新されること","有効なセッション","import_data完了後","status=DataImportStatusCode.PROCESSING","高","ステータス遷移"
"23","UT-IMP-023","importer.models.DataImportSession","import_data","異常系","データファイル読み込み失敗時にログが出力されること","破損したデータファイル","import_data呼び出し","エラーログが出力される","中","エラーハンドリング"
"24","UT-IMP-024","importer.models.DataImportSession","check_complete","正常系","全行完了時にTrueが返却されること","全DataImportRowがcomplete=True","check_complete呼び出し","Trueが返却される","高","完了チェック"
"25","UT-IMP-025","importer.models.DataImportSession","check_complete","正常系","全行完了時にステータスがCOMPLETEに更新されること","全DataImportRowがcomplete=True","check_complete呼び出し","status=DataImportStatusCode.COMPLETE","高","ステータス遷移"
"26","UT-IMP-026","importer.models.DataImportSession","check_complete","正常系","未完了行がある場合にFalseが返却されること","一部のDataImportRowがcomplete=False","check_complete呼び出し","Falseが返却される","中","未完了チェック"
"27","UT-IMP-027","importer.models.DataImportSession","row_count","正常系","正しい行数が返却されること","5行のDataImportRowが存在","row_countプロパティ取得","5が返却される","中","行数カウント"
"28","UT-IMP-028","importer.models.DataImportSession","completed_row_count","正常系","完了行数が正しく返却されること","5行中3行がcomplete=True","completed_row_countプロパティ取得","3が返却される","中","完了行数カウント"
"29","UT-IMP-029","importer.models.DataImportSession","available_fields","正常系","シリアライザのフィールド情報が返却されること","有効なmodel_type","available_fields呼び出し","OrderedDictでフィールド情報が返却される","中","フィールド情報取得"
"30","UT-IMP-030","importer.models.DataImportSession","available_fields","正常系","update_records=Trueの場合にIDフィールドが含まれること","update_records=True","available_fields呼び出し","'id'フィールドが含まれる","高","レコード更新モード"
"31","UT-IMP-031","importer.models.DataImportSession","available_fields","正常系","フィールド情報がキャッシュされること","available_fieldsを2回呼び出し","2回目の呼び出し","キャッシュされた値が返却される","低","キャッシュ機能"
"32","UT-IMP-032","importer.models.DataImportSession","required_fields","正常系","必須フィールドのみが返却されること","required=Trueのフィールドが存在","required_fields呼び出し","required=Trueのフィールドのみ返却される","中","必須フィールド抽出"
"33","UT-IMP-033","importer.models.DataImportSession","required_fields","正常系","update_records=Trueの場合にIDフィールドが必須になること","update_records=True","required_fields呼び出し","'id'フィールドがrequired_fieldsに含まれる","高","レコード更新モード"
"34","UT-IMP-034","importer.models.DataImportColumnMap","save","正常系","バリデーションが実行されること","有効なマッピング","save呼び出し","cleanとvalidate_uniqueが呼び出される","高","保存時バリデーション"
"35","UT-IMP-035","importer.models.DataImportColumnMap","validate_unique","異常系","同一カラムの重複マッピングでエラーが発生すること","同一sessionで同一columnが既にマッピング済み","同じcolumnで新規マッピング作成","ValidationError(column)","高","一意性制約"
"36","UT-IMP-036","importer.models.DataImportColumnMap","validate_unique","異常系","同一フィールドの重複マッピングでエラーが発生すること","同一sessionで同一fieldが既にマッピング済み","同じfieldで新規マッピング作成","ValidationError(field)","高","一意性制約"
"37","UT-IMP-037","importer.models.DataImportColumnMap","validate_unique","正常系","空カラムは重複チェックがスキップされること","column=''のマッピングが複数存在","空カラムで新規マッピング作成","エラーなし","中","空カラム許可"
"38","UT-IMP-038","importer.models.DataImportColumnMap","clean","異常系","sessionがNullの場合にエラーが発生すること","session=None","clean呼び出し","ValidationError(session)","高","必須チェック"
"39","UT-IMP-039","importer.models.DataImportColumnMap","clean","異常系","存在しないカラム名でエラーが発生すること","columnがsession.columnsに存在しない","column=""invalid_column""","ValidationError(column)","高","カラム存在チェック"
"40","UT-IMP-040","importer.models.DataImportColumnMap","clean","異常系","存在しないフィールドでエラーが発生すること","fieldがavailable_fieldsに存在しない","field=""invalid_field""","ValidationError(field)","高","フィールド存在チェック"
"41","UT-IMP-041","importer.models.DataImportColumnMap","clean","異常系","read_onlyフィールドでエラーが発生すること","fieldがread_only=Trueのフィールド","field=""pk""","ValidationError(field)","高","読み取り専用チェック"
"42","UT-IMP-042","importer.models.DataImportColumnMap","get_api_url","正常系","正しいAPI URLが返却されること","なし","なし","reverse('api-importer-mapping-list')の値が返却される","低","静的メソッド検証"
"43","UT-IMP-043","importer.models.DataImportColumnMap","available_fields","正常系","セッションのフィールド情報が返却されること","有効なsession","available_fieldsプロパティ取得","session.available_fields()の値が返却される","中","プロパティ検証"
"44","UT-IMP-044","importer.models.DataImportColumnMap","available_fields","正常系","フィールド情報がキャッシュされること","available_fieldsを2回取得","2回目の取得","キャッシュされた値が返却される","低","キャッシュ機能"
"45","UT-IMP-045","importer.models.DataImportColumnMap","field_definition","正常系","フィールド定義が返却されること","有効なfield名","field=""name""","フィールドの定義辞書が返却される","中","プロパティ検証"
"46","UT-IMP-046","importer.models.DataImportColumnMap","field_definition","境界値","存在しないフィールドでNoneが返却されること","fieldが無効","field=""invalid""","Noneが返却される","中","境界値検証"
"47","UT-IMP-047","importer.models.DataImportColumnMap","label","正常系","フィールドのラベルが返却されること","有効なfield","field=""name""","フィールドのlabel属性値が返却される","低","プロパティ検証"
"48","UT-IMP-048","importer.models.DataImportColumnMap","description","正常系","フィールドの説明が返却されること","有効なfield、help_textが設定済み","field=""name""","help_textの値が返却される","低","プロパティ検証"
"49","UT-IMP-049","importer.models.DataImportColumnMap","description","正常系","help_textがない場合はlabelが返却されること","有効なfield、help_textが未設定","field=""name""","labelの値が返却される","低","フォールバック動作"
"50","UT-IMP-050","importer.models.DataImportRow","save","正常系","保存時にvalidateが実行されること","有効なDataImportRow","save呼び出し","validateが呼び出されvalidフィールドが設定される","高","保存時バリデーション"
"51","UT-IMP-051","importer.models.DataImportRow","get_api_url","正常系","正しいAPI URLが返却されること","なし","なし","reverse('api-importer-row-list')の値が返却される","低","静的メソッド検証"
"52","UT-IMP-052","importer.models.DataImportRow","default_values","正常系","セッションのデフォルト値が返却されること","session.field_defaults={""name"":""Default""}","default_valuesプロパティ取得","{""name"":""Default""}が返却される","中","プロパティ検証"
"53","UT-IMP-053","importer.models.DataImportRow","default_values","境界値","field_defaultsがNoneの場合に空辞書が返却されること","session.field_defaults=None","default_valuesプロパティ取得","{}が返却される","中","Null処理"
"54","UT-IMP-054","importer.models.DataImportRow","default_values","異常系","不正なJSON文字列の場合に空辞書が返却されること","session.field_defaults=""invalid_json""","default_valuesプロパティ取得","{}が返却される","中","エラーハンドリング"
"55","UT-IMP-055","importer.models.DataImportRow","override_values","正常系","セッションのオーバーライド値が返却されること","session.field_overrides={""active"":True}","override_valuesプロパティ取得","{""active"":True}が返却される","中","プロパティ検証"
"56","UT-IMP-056","importer.models.DataImportRow","override_values","境界値","field_overridesがNoneの場合に空辞書が返却されること","session.field_overrides=None","override_valuesプロパティ取得","{}が返却される","中","Null処理"
"57","UT-IMP-057","importer.models.DataImportRow","extract_data","正常系","行データからフィールドデータが抽出されること","有効なrow_dataとfield_mapping","extract_data呼び出し","self.dataにマッピングされたデータが設定される","高","データ抽出"
"58","UT-IMP-058","importer.models.DataImportRow","extract_data","正常系","オーバーライド値が最優先で使用されること","override_values={""name"":""Override""}","extract_data呼び出し","data[""name""]==""Override""","高","オーバーライド優先"
"59","UT-IMP-059","importer.models.DataImportRow","extract_data","正常系","デフォルト値が使用されること","default_values={""active"":True}、row_dataにactiveがない","extract_data呼び出し","data[""active""]==True","中","デフォルト値適用"
"60","UT-IMP-060","importer.models.DataImportRow","extract_data","正常系","booleanフィールドが正しく変換されること","field_type=""boolean""","row_data={""active"":""true""}","data[""active""]==True","中","型変換"
"61","UT-IMP-061","importer.models.DataImportRow","extract_data","正常系","dateフィールドでNone値が保持されること","field_type=""date""","row_data={""date"":""""}","data[""date""]==None","中","日付型処理"
"62","UT-IMP-062","importer.models.DataImportRow","extract_data","正常系","choiceフィールドで値がマッチすること","field_type=""choice""、choices=[{value:1,display_name:""Active""}]","row_data={""status"":""Active""}","data[""status""]==1","中","選択肢マッチング"
"63","UT-IMP-063","importer.models.DataImportRow","extract_data","正常系","choiceフィールドで大文字小文字を無視してマッチすること","field_type=""choice""","row_data={""status"":""ACTIVE""}","正しい値にマッチする","中","大文字小文字無視"
"64","UT-IMP-064","importer.models.DataImportRow","extract_data","正常系","commit=Trueの場合に保存されること","有効なデータ","extract_data(commit=True)","self.saveが呼び出される","中","コミットオプション"
"65","UT-IMP-065","importer.models.DataImportRow","extract_data","正常系","commit=Falseの場合は保存されないこと","有効なデータ","extract_data(commit=False)","self.saveが呼び出されない","中","コミットオプション"
"66","UT-IMP-066","importer.models.DataImportRow","serializer_data","正常系","シリアライザ用データが正しく構築されること","default_values、data、override_valuesが設定済み","serializer_data呼び出し","default→data→overrideの順でマージされた辞書","高","データ構築"
"67","UT-IMP-067","importer.models.DataImportRow","serializer_data","正常系","オーバーライド値が最優先されること","override_values={""name"":""Override""}、data={""name"":""Data""}","serializer_data呼び出し","name==""Override""","高","優先順位検証"
"68","UT-IMP-068","importer.models.DataImportRow","construct_serializer","正常系","シリアライザインスタンスが作成されること","有効なsession.serializer_class","construct_serializer呼び出し","シリアライザインスタンスが返却される","中","シリアライザ生成"
"69","UT-IMP-069","importer.models.DataImportRow","construct_serializer","正常系","update時にinstanceが渡されること","instance引数あり","construct_serializer(instance=obj)","シリアライザにinstanceが設定される","中","更新モード"
"70","UT-IMP-070","importer.models.DataImportRow","construct_serializer","異常系","serializer_classがNoneの場合Noneが返却されること","session.serializer_class=None","construct_serializer呼び出し","Noneが返却される","中","異常系検証"
"71","UT-IMP-071","importer.models.DataImportRow","validate","正常系","有効なデータでTrueが返却されること","有効なデータ","validate呼び出し","Trueが返却される、errors=None","高","バリデーション成功"
"72","UT-IMP-072","importer.models.DataImportRow","validate","正常系","complete=Trueの場合にTrueが即座に返却されること","complete=True","validate呼び出し","Trueが返却される","中","完了済みスキップ"
"73","UT-IMP-073","importer.models.DataImportRow","validate","異常系","バリデーションエラー時にFalseが返却されること","無効なデータ","validate呼び出し","Falseが返却される、errorsにエラー詳細","高","バリデーション失敗"
"74","UT-IMP-074","importer.models.DataImportRow","validate","異常系","シリアライザがない場合にFalseが返却されること","session.serializer_class=None","validate呼び出し","Falseが返却される、non_field_errorsにエラー","中","異常系検証"
"75","UT-IMP-075","importer.models.DataImportRow","validate","正常系","commit=Trueでシリアライザが保存されること","有効なデータ","validate(commit=True)","serializer.saveが呼び出される、complete=True","高","コミット処理"
"76","UT-IMP-076","importer.models.DataImportRow","validate","正常系","commit=True完了後にcheck_completeが呼び出されること","有効なデータ","validate(commit=True)","session.check_completeが呼び出される","中","完了チェック連携"
"77","UT-IMP-077","importer.models.DataImportRow","validate","異常系","update_records時にIDが必須であること","session.update_records=True、data.id=None","validate呼び出し","ValidationError(ID is required)","高","レコード更新モード"
"78","UT-IMP-078","importer.models.DataImportRow","validate","異常系","update_records時に存在しないIDでエラーになること","session.update_records=True、data.id=99999(存在しない)","validate呼び出し","Falseが返却される、errors[non_field_errors]","高","存在チェック"
"79","UT-IMP-079","importer.models.DataImportRow","validate","異常系","update_records時に不正なID形式でエラーになること","session.update_records=True、data.id=""invalid""","validate呼び出し","Falseが返却される、errors[non_field_errors]","高","ID形式チェック"
"80","UT-IMP-080","importer.mixins.DataImportSerializerMixin","__init__","正常系","importing=Trueでインポート不可フィールドが除外されること","importing=True","シリアライザ初期化","read_onlyフィールドなどが除外される","高","フィールド除外"
"81","UT-IMP-081","importer.mixins.DataImportSerializerMixin","__init__","正常系","importing=Falseでimport_only_fieldsが除外されること","importing=False","シリアライザ初期化","import_only_fieldsが除外される","中","通常モード"
"82","UT-IMP-082","importer.mixins.DataImportSerializerMixin","__init__","正常系","importing=Trueでimport_exclude_fieldsが除外されること","importing=True、import_exclude_fields=[""field1""]","シリアライザ初期化","field1が除外される","中","除外フィールド"
"83","UT-IMP-083","importer.mixins.DataImportSerializerMixin","get_import_only_fields","正常系","import_only_fieldsリストが返却されること","import_only_fields=[""field1""]","get_import_only_fields呼び出し","[""field1""]が返却される","低","メソッド検証"
"84","UT-IMP-084","importer.mixins.DataImportSerializerMixin","get_import_exclude_fields","正常系","import_exclude_fieldsリストが返却されること","import_exclude_fields=[""field1""]","get_import_exclude_fields呼び出し","[""field1""]が返却される","低","メソッド検証"
"85","UT-IMP-085","importer.mixins.DataImportSerializerMixin","get_importable_fields","正常系","インポート可能フィールドが返却されること","複数フィールドを持つシリアライザ","get_importable_fields呼び出し","read_only以外のフィールドが返却される","高","フィールド抽出"
"86","UT-IMP-086","importer.mixins.DataImportSerializerMixin","get_importable_fields","正常系","read_onlyフィールドが除外されること","read_only=Trueのフィールドが存在","get_importable_fields呼び出し","read_onlyフィールドが含まれない","高","除外ロジック"
"87","UT-IMP-087","importer.mixins.DataImportSerializerMixin","get_importable_fields","正常系","Serializerサブクラスフィールドが除外されること","ネストされたシリアライザフィールドが存在","get_importable_fields呼び出し","ネストされたシリアライザが含まれない","中","除外ロジック"
"88","UT-IMP-088","importer.mixins.DataImportSerializerMixin","get_importable_fields","正常系","FileFieldが除外されること","FileFieldが存在","get_importable_fields呼び出し","FileFieldが含まれない","中","除外ロジック"
"89","UT-IMP-089","importer.mixins.DataImportSerializerMixin","get_importable_fields","正常系","TagListSerializerFieldが除外されること","TagListSerializerFieldが存在","get_importable_fields呼び出し","TagListSerializerFieldが含まれない","中","除外ロジック"
"90","UT-IMP-090","importer.validators.validate_data_file","","正常系","有効なファイルでエラーが発生しないこと","有効なCSVファイル","validate_data_file(file)","エラーなし","高","バリデーション成功"
"91","UT-IMP-091","importer.validators.validate_data_file","","異常系","ファイルサイズ超過でエラーが発生すること","ファイルサイズ > IMPORTER_MAX_FILE_SIZE","validate_data_file(large_file)","ValidationError(Data file exceeds maximum size limit)","高","サイズ制限"
"92","UT-IMP-092","importer.validators.validate_data_file","","異常系","ヘッダーがないファイルでエラーが発生すること","ヘッダーのないCSVファイル","validate_data_file(no_header_file)","ValidationError(Data file contains no headers)","高","ヘッダーチェック"
"93","UT-IMP-093","importer.validators.validate_data_file","","異常系","カラム数超過でエラーが発生すること","カラム数 > IMPORTER_MAX_COLS(1000)","validate_data_file(many_cols_file)","ValidationError(Data file contains too many columns)","高","カラム数制限"
"94","UT-IMP-094","importer.validators.validate_data_file","","異常系","行数超過でエラーが発生すること","行数 > IMPORTER_MAX_ROWS(5000)","validate_data_file(many_rows_file)","ValidationError(Data file contains too many rows)","高","行数制限"
"95","UT-IMP-095","importer.validators.validate_importer_model_type","","正常系","サポートされたモデルタイプでエラーが発生しないこと","model_type=""company""","validate_importer_model_type(""company"")","エラーなし","高","モデルタイプ検証"
"96","UT-IMP-096","importer.validators.validate_importer_model_type","","異常系","サポートされていないモデルタイプでエラーが発生すること","model_type=""invalid""","validate_importer_model_type(""invalid"")","ValidationError(Unsupported model type)","高","モデルタイプ検証"
"97","UT-IMP-097","importer.validators.validate_field_defaults","","正常系","有効な辞書でエラーが発生しないこと","value={""name"":""Test""}","validate_field_defaults({""name"":""Test""})","エラーなし","中","辞書検証"
"98","UT-IMP-098","importer.validators.validate_field_defaults","","正常系","Noneでエラーが発生しないこと","value=None","validate_field_defaults(None)","エラーなし","中","Null許可"
"99","UT-IMP-099","importer.validators.validate_field_defaults","","正常系","JSON文字列が受け入れられること","value='{""name"":""Test""}'","validate_field_defaults('{""name"":""Test""}')","エラーなし","中","JSON文字列"
"100","UT-IMP-100","importer.validators.validate_field_defaults","","異常系","不正なJSON文字列でエラーが発生すること","value=""invalid""","validate_field_defaults(""invalid"")","ValidationError(Value must be a valid dictionary object)","中","不正JSON"
"101","UT-IMP-101","importer.operations.load_data_file","","正常系","CSVファイルが正しく読み込まれること","有効なCSVファイル","load_data_file(csv_file)","tablibのDatasetが返却される","高","ファイル読み込み"
"102","UT-IMP-102","importer.operations.load_data_file","","正常系","Excelファイルが正しく読み込まれること","有効なXLSXファイル","load_data_file(xlsx_file)","tablibのDatasetが返却される","高","Excelサポート"
"103","UT-IMP-103","importer.operations.load_data_file","","正常系","ファイル拡張子から形式が判定されること","file.csv","load_data_file(file)","CSV形式として読み込まれる","中","形式判定"
"104","UT-IMP-104","importer.operations.load_data_file","","異常系","サポートされていない形式でエラーが発生すること","file.txt","load_data_file(txt_file)","ValidationError(Unsupported data file format)","高","形式チェック"
"105","UT-IMP-105","importer.operations.load_data_file","","異常系","ファイル読み込みエラー時に例外が発生すること","読み込み不可のファイル","load_data_file(unreadable_file)","ValidationError(Failed to open data file)","中","エラーハンドリング"
"106","UT-IMP-106","importer.operations.load_data_file","","異常系","不正なデータ形式でエラーが発生すること","不正なCSV形式","load_data_file(invalid_csv)","ValidationError(Unsupported data file format/Invalid data file dimensions)","中","データ形式エラー"
"107","UT-IMP-107","importer.operations.extract_column_names","","正常系","カラム名が正しく抽出されること","有効なCSV(ヘッダー:Name,Description)","extract_column_names(file)","[""Name"",""Description""]","高","カラム抽出"
"108","UT-IMP-108","importer.operations.extract_column_names","","正常系","空ヘッダーにデフォルト名が付与されること","ヘッダーに空列を含むCSV","extract_column_names(file)","空列は""Column N""形式になる","中","デフォルト名"
"109","UT-IMP-109","importer.operations.extract_column_names","","正常系","ヘッダーの前後空白がトリムされること","ヘッダーに空白を含むCSV","extract_column_names(file)","空白が除去されたヘッダー名","低","トリム処理"
"110","UT-IMP-110","importer.operations.get_field_label","","正常系","フィールドのラベルが返却されること","field.label=""Name""","get_field_label(field)","Name","低","ラベル取得"
"111","UT-IMP-111","importer.operations.get_field_label","","境界値","ラベルがない場合にNoneが返却されること","field.label=None","get_field_label(field)","None","低","Null処理"
"112","UT-IMP-112","importer.registry.DataImportSerializerRegister","register","正常系","有効なシリアライザが登録されること","DataImportSerializerMixinを継承したシリアライザ","register(serializer)","supported_serializersに追加される","高","シリアライザ登録"
"113","UT-IMP-113","importer.registry.DataImportSerializerRegister","register","異常系","DataImportSerializerMixinを継承していない場合は登録されないこと","通常のシリアライザ","register(serializer)","supported_serializersに追加されない","中","継承チェック"
"114","UT-IMP-114","importer.registry.DataImportSerializerRegister","register","異常系","Serializerを継承していない場合は登録されないこと","Serializer以外のクラス","register(cls)","supported_serializersに追加されない","中","型チェック"
"115","UT-IMP-115","importer.registry.DataImportSerializerRegister","register","正常系","重複登録が防止されること","同じシリアライザを2回登録","register(serializer)×2","1回のみ登録される","中","重複防止"
"116","UT-IMP-116","importer.registry.get_supported_serializers","","正常系","登録済みシリアライザ一覧が返却されること","複数のシリアライザが登録済み","get_supported_serializers()","登録済みシリアライザのリスト","中","一覧取得"
"117","UT-IMP-117","importer.registry.supported_models","","正常系","モデル名とシリアライザのマップが返却されること","複数のシリアライザが登録済み","supported_models()","{model_name: serializer}形式の辞書","中","モデルマップ"
"118","UT-IMP-118","importer.registry.supported_model_options","","正常系","モデル選択肢一覧が返却されること","複数のシリアライザが登録済み","supported_model_options()","[(model_name,verbose_name)]形式のリスト","中","選択肢生成"
"119","UT-IMP-119","importer.registry.register_importer","","正常系","デコレータでシリアライザが登録されること","@register_importer()を付与","デコレータ適用","シリアライザが登録される","高","デコレータ機能"
"120","UT-IMP-120","importer.tasks.import_data","","正常系","セッションのimport_dataが呼び出されること","有効なsession_id","import_data(session_id)","session.import_dataが呼び出される","高","タスク実行"
"121","UT-IMP-121","importer.tasks.import_data","","異常系","存在しないsession_idでエラーログが出力されること","存在しないsession_id","import_data(9999)","エラーログが出力される、例外なし","中","エラーハンドリング"
"122","UT-IMP-122","importer.tasks.cleanup_import_sessions","","正常系","古いセッションが削除されること","5日以上前のセッションが存在","cleanup_import_sessions()","古いセッションが削除される","中","クリーンアップ"
"123","UT-IMP-123","importer.tasks.cleanup_import_sessions","","正常系","新しいセッションは削除されないこと","5日以内のセッションのみ存在","cleanup_import_sessions()","セッションが削除されない","中","保持期間"
"124","UT-IMP-124","importer.tasks.cleanup_import_sessions","","正常系","前回実行から5日未満の場合はスキップされること","前回実行から3日経過","cleanup_import_sessions()","削除処理がスキップされる","低","実行間隔"
"125","UT-IMP-125","importer.serializers.DataImportSessionSerializer","validate_field_defaults","正常系","辞書型がそのまま返却されること","defaults={""name"":""Test""}","validate_field_defaults({""name"":""Test""})","{""name"":""Test""}が返却される","中","辞書検証"
"126","UT-IMP-126","importer.serializers.DataImportSessionSerializer","validate_field_defaults","正常系","Noneがそのまま返却されること","defaults=None","validate_field_defaults(None)","Noneが返却される","中","Null許可"
"127","UT-IMP-127","importer.serializers.DataImportSessionSerializer","validate_field_defaults","正常系","JSON文字列がパースされること","defaults='{""name"":""Test""}'","validate_field_defaults('string')","{""name"":""Test""}が返却される","中","JSON変換"
"128","UT-IMP-128","importer.serializers.DataImportSessionSerializer","validate_field_defaults","異常系","不正なJSON文字列でエラーが発生すること","defaults=""invalid""","validate_field_defaults(""invalid"")","ValidationError(Invalid field defaults)","中","バリデーション"
"129","UT-IMP-129","importer.serializers.DataImportSessionSerializer","validate_field_overrides","正常系","辞書型がそのまま返却されること","overrides={""active"":True}","validate_field_overrides({""active"":True})","{""active"":True}が返却される","中","辞書検証"
"130","UT-IMP-130","importer.serializers.DataImportSessionSerializer","validate_field_overrides","異常系","不正なJSON文字列でエラーが発生すること","overrides=""invalid""","validate_field_overrides(""invalid"")","ValidationError(Invalid field overrides)","中","バリデーション"
"131","UT-IMP-131","importer.serializers.DataImportSessionSerializer","validate_field_filters","正常系","辞書型がそのまま返却されること","filters={""status"":1}","validate_field_filters({""status"":1})","{""status"":1}が返却される","中","辞書検証"
"132","UT-IMP-132","importer.serializers.DataImportSessionSerializer","validate_field_filters","異常系","不正なJSON文字列でエラーが発生すること","filters=""invalid""","validate_field_filters(""invalid"")","ValidationError(Invalid field filters)","中","バリデーション"
"133","UT-IMP-133","importer.serializers.DataImportSessionSerializer","create","正常系","セッションにユーザーが設定されること","request.user=authenticated_user","create(validated_data)","session.user=request.userが設定される","高","ユーザー設定"
"134","UT-IMP-134","importer.serializers.DataImportSessionSerializer","create","正常系","requestがない場合もセッションが作成されること","request=None","create(validated_data)","セッションが作成される、user=None","中","リクエストなし"
"135","UT-IMP-135","importer.serializers.DataImportAcceptRowSerializer","validate_rows","異常系","空のrowsリストでエラーが発生すること","rows=[]","validate_rows([])","ValidationError(No rows provided)","高","空チェック"
"136","UT-IMP-136","importer.serializers.DataImportAcceptRowSerializer","validate_rows","異常系","別セッションの行でエラーが発生すること","row.session!=context.session","validate_rows([row])","ValidationError(Row does not belong to this session)","高","セッションチェック"
"137","UT-IMP-137","importer.serializers.DataImportAcceptRowSerializer","validate_rows","異常系","無効な行でエラーが発生すること","row.valid=False","validate_rows([row])","ValidationError(Row contains invalid data)","高","有効性チェック"
"138","UT-IMP-138","importer.serializers.DataImportAcceptRowSerializer","validate_rows","異常系","完了済み行でエラーが発生すること","row.complete=True","validate_rows([row])","ValidationError(Row has already been completed)","高","完了チェック"
"139","UT-IMP-139","importer.serializers.DataImportAcceptRowSerializer","save","正常系","全行のvalidateがcommit=Trueで呼び出されること","有効なrows","save()","各rowでvalidate(commit=True)が呼び出される","高","保存処理"
"140","UT-IMP-140","importer.serializers.DataImportAcceptRowSerializer","save","正常系","完了後にcheck_completeが呼び出されること","有効なrows、session存在","save()","session.check_completeが呼び出される","中","完了チェック連携"
"141","UT-IMP-141","importer.status_codes.DataImportStatusCode","INITIAL","正常系","初期状態の値が正しいこと","なし","DataImportStatusCode.INITIAL.value","0","低","ステータスコード"
"142","UT-IMP-142","importer.status_codes.DataImportStatusCode","MAPPING","正常系","マッピング状態の値が正しいこと","なし","DataImportStatusCode.MAPPING.value","10","低","ステータスコード"
"143","UT-IMP-143","importer.status_codes.DataImportStatusCode","IMPORTING","正常系","インポート状態の値が正しいこと","なし","DataImportStatusCode.IMPORTING.value","20","低","ステータスコード"
"144","UT-IMP-144","importer.status_codes.DataImportStatusCode","PROCESSING","正常系","処理状態の値が正しいこと","なし","DataImportStatusCode.PROCESSING.value","30","低","ステータスコード"
"145","UT-IMP-145","importer.status_codes.DataImportStatusCode","COMPLETE","正常系","完了状態の値が正しいこと","なし","DataImportStatusCode.COMPLETE.value","40","低","ステータスコード"
