"No","テストID","対象クラス","対象メソッド","テスト観点","テストケース名","前提条件","入力値","期待結果","優先度","備考"
"1","UT-PRT-001","part.models.PartCategory","delete","正常系","子カテゴリを含めずに削除できること","PartCategoryが存在する","delete_child_categories=False","カテゴリが削除され、子カテゴリは親に移動する","高","階層構造の整合性"
"2","UT-PRT-002","part.models.PartCategory","delete","正常系","子カテゴリを含めて削除できること","PartCategoryと子カテゴリが存在する","delete_child_categories=True","カテゴリと子カテゴリが全て削除される","高","階層構造の整合性"
"3","UT-PRT-003","part.models.PartCategory","clean","異常系","structuralカテゴリにパーツが割り当てられている場合ValidationErrorが発生すること","パーツが割り当てられたカテゴリが存在する","structural=True","ValidationError発生","高","データ整合性"
"4","UT-PRT-004","part.models.PartCategory","get_parts","正常系","カスケードtrueで子カテゴリのパーツも取得できること","親カテゴリと子カテゴリにパーツが存在する","cascade=True","全てのパーツが取得される","中","リレーション"
"5","UT-PRT-005","part.models.PartCategory","get_parts","正常系","カスケードfalseで直接のパーツのみ取得できること","親カテゴリと子カテゴリにパーツが存在する","cascade=False","直接のパーツのみ取得される","中","リレーション"
"6","UT-PRT-006","part.models.PartCategory","partcount","正常系","アクティブなパーツのみカウントできること","アクティブ・非アクティブパーツが存在する","active=True","アクティブパーツ数が返却される","中","フィルタリング"
"7","UT-PRT-007","part.models.PartCategory","icon","正常系","_iconが設定されていればその値が返却されること","_icon=ti:folder","なし","ti:folderが返却される","低","プロパティ"
"8","UT-PRT-008","part.models.PartCategory","icon","正常系","_iconが未設定でデフォルトアイコンが設定されていればデフォルト値が返却されること","_icon=None、グローバル設定にデフォルトアイコン設定済み","なし","デフォルトアイコンが返却される","低","プロパティ"
"9","UT-PRT-009","part.models.PartCategory","get_subscribers","正常系","購読ユーザーが正しく取得できること","PartCategoryStarが存在する","include_parents=True","購読ユーザーリストが返却される","中","通知機能"
"10","UT-PRT-010","part.models.PartCategory","is_starred_by","正常系","指定ユーザーが購読しているか判定できること","ユーザーがカテゴリを購読済み","user=購読ユーザー","Trueが返却される","中","通知機能"
"11","UT-PRT-011","part.models.PartCategory","set_starred","正常系","購読状態を設定できること","購読していないユーザー","status=True","PartCategoryStarが作成される","中","通知機能"
"12","UT-PRT-012","part.models.PartCategory","set_starred","正常系","購読解除できること","購読しているユーザー","status=False","PartCategoryStarが削除される","中","通知機能"
"13","UT-PRT-013","part.models.PartCategoryParameterTemplate","clean","正常系","default_valueが正しく検証されること","テンプレートにunits設定あり","default_value=10mm","検証成功","中","バリデーション"
"14","UT-PRT-014","part.models.PartCategoryParameterTemplate","clean","異常系","default_valueが不正な単位の場合ValidationErrorが発生すること","テンプレートにunits設定あり","default_value=invalid","ValidationError発生","中","バリデーション"
"15","UT-PRT-015","part.models.Part","delete","異常系","ロックされたパーツは削除できないこと","locked=Trueのパーツ","なし","ValidationError発生","高","データ保護"
"16","UT-PRT-016","part.models.Part","delete","異常系","アクティブなパーツは削除できないこと","active=Trueのパーツ","なし","ValidationError発生","高","データ保護"
"17","UT-PRT-017","part.models.Part","delete","異常系","BOMで使用中のパーツは設定により削除できないこと","BomItemで参照されているパーツ","PART_ALLOW_DELETE_FROM_ASSEMBLY=False","ValidationError発生","高","データ整合性"
"18","UT-PRT-018","part.models.Part","save","正常系","新規作成時にensure_trackableが呼ばれること","新規パーツ","trackable=True","trackable設定が親パーツに伝播する","高","データ整合性"
"19","UT-PRT-019","part.models.Part","save","正常系","画像変更時に古い画像が削除されること","他パーツから参照されていない画像が設定済み","新しい画像を設定","古い画像が削除される","中","ファイル管理"
"20","UT-PRT-020","part.models.Part","check_add_to_bom","正常系","自身をBOMに追加できないこと","パーツA","parent=パーツA","Falseが返却される","高","循環参照防止"
"21","UT-PRT-021","part.models.Part","check_add_to_bom","正常系","同じバリアントツリーのパーツはBOMに追加できないこと","variant_ofで関連するパーツ","parent=バリアントパーツ","Falseが返却される","高","循環参照防止"
"22","UT-PRT-022","part.models.Part","check_add_to_bom","正常系","BOMに含まれるパーツをBOMに追加できないこと","パーツBがパーツAのBOMに存在","parent=パーツB","Falseが返却される","高","循環参照防止"
"23","UT-PRT-023","part.models.Part","validate_name","正常系","プラグインによる名前検証が実行されること","Validationプラグインが登録済み","name=TestPart","プラグインの検証結果に従う","中","拡張性"
"24","UT-PRT-024","part.models.Part","validate_ipn","正常系","IPN正規表現パターンに一致する場合検証成功すること","PART_IPN_REGEX設定済み","IPN=パターンに一致","検証成功","高","バリデーション"
"25","UT-PRT-025","part.models.Part","validate_ipn","異常系","IPN正規表現パターンに一致しない場合ValidationErrorが発生すること","PART_IPN_REGEX設定済み","IPN=パターンに不一致","ValidationError発生","高","バリデーション"
"26","UT-PRT-026","part.models.Part","validate_revision","異常系","自身のリビジョンにはなれないこと","パーツA","revision_of=パーツA","ValidationError発生","高","バリデーション"
"27","UT-PRT-027","part.models.Part","validate_revision","異常系","リビジョンのリビジョンは作成できないこと","パーツBがパーツAのリビジョン","revision_of=パーツB","ValidationError発生","高","バリデーション"
"28","UT-PRT-028","part.models.Part","validate_revision","異常系","リビジョンにはリビジョンコードが必須であること","revision_ofが設定済み","revision=None","ValidationError発生","高","バリデーション"
"29","UT-PRT-029","part.models.Part","validate_serial_number","正常系","有効なシリアル番号が検証成功すること","パーツにシリアル番号未使用","serial=SN001","Trueが返却される","高","シリアル番号管理"
"30","UT-PRT-030","part.models.Part","validate_serial_number","異常系","重複シリアル番号で検証失敗すること","同一シリアル番号のStockItem存在","serial=既存SN","Falseまたは ValidationError","高","シリアル番号管理"
"31","UT-PRT-031","part.models.Part","validate_serial_number","正常系","グローバルユニーク設定時に全パーツでユニークチェックされること","SERIAL_NUMBER_GLOBALLY_UNIQUE=True","serial=SN001","全パーツで重複チェック実施","高","シリアル番号管理"
"32","UT-PRT-032","part.models.Part","find_conflicting_serial_numbers","正常系","競合するシリアル番号リストを取得できること","一部のシリアル番号が既存","serials=[SN001, SN002, SN003]","競合するシリアル番号リストが返却される","中","シリアル番号管理"
"33","UT-PRT-033","part.models.Part","get_latest_serial_number","正常系","最新のシリアル番号を取得できること","複数StockItemにシリアル番号設定済み","なし","最大のシリアル番号が返却される","中","シリアル番号管理"
"34","UT-PRT-034","part.models.Part","get_next_serial_number","正常系","次のシリアル番号を取得できること","最新シリアル番号がSN099","なし","SN100等のインクリメント値","中","シリアル番号管理"
"35","UT-PRT-035","part.models.Part","full_name","正常系","PART_NAME_FORMAT設定に従ってフルネームが生成されること","PART_NAME_FORMAT設定済み","なし","フォーマットに従った名前が返却される","中","プロパティ"
"36","UT-PRT-036","part.models.Part","validate_unique","異常系","重複IPNで設定により検証失敗すること","PART_ALLOW_DUPLICATE_IPN=False","IPN=既存IPN","ValidationError発生","高","一意性制約"
"37","UT-PRT-037","part.models.Part","validate_unique","正常系","重複IPNで設定により検証成功すること","PART_ALLOW_DUPLICATE_IPN=True","IPN=既存IPN","検証成功","高","一意性制約"
"38","UT-PRT-038","part.models.Part","clean","異常系","structuralカテゴリにはパーツを割り当てられないこと","category.structural=True","なし","ValidationError発生","高","バリデーション"
"39","UT-PRT-039","part.models.Part","ensure_trackable","正常系","trackableパーツを使用する親パーツもtrackableになること","trackable=Trueのパーツ","BOMに追加","親パーツのtrackable=True","高","データ整合性"
"40","UT-PRT-040","part.models.Part","get_default_location","正常系","デフォルトロケーションが設定されていればそれを返却すること","default_location設定済み","なし","設定されたロケーションが返却される","中","プロパティ"
"41","UT-PRT-041","part.models.Part","get_default_location","正常系","パーツに未設定でカテゴリにロケーション設定があればそれを返却すること","パーツ未設定、カテゴリ設定済み","なし","カテゴリのロケーションが返却される","中","プロパティ"
"42","UT-PRT-042","part.models.Part","get_default_supplier","正常系","default_supplier設定済みならそれを返却すること","default_supplier設定済み","なし","設定されたサプライヤーが返却される","中","プロパティ"
"43","UT-PRT-043","part.models.Part","get_default_supplier","正常系","サプライヤーが1件のみなら自動選択されること","supplier_parts=1件","なし","唯一のサプライヤーが返却される","中","プロパティ"
"44","UT-PRT-044","part.models.Part","available_stock","正常系","利用可能在庫数が正しく計算されること","total_stock=100、allocation=30","なし","70が返却される","高","在庫計算"
"45","UT-PRT-045","part.models.Part","available_stock","境界値","アロケーションが総在庫を超える場合0が返却されること","total_stock=50、allocation=80","なし","0が返却される","高","在庫計算"
"46","UT-PRT-046","part.models.Part","requiring_build_orders","正常系","このパーツを必要とするビルドオーダーを取得できること","BOMでパーツが使用され、アクティブなビルドオーダー存在","include_variants=True","ビルドオーダーリストが返却される","中","関連データ取得"
"47","UT-PRT-047","part.models.Part","required_build_order_quantity","正常系","ビルドオーダーに必要な数量を計算できること","アクティブなビルドオーダー存在","include_variants=True","必要数量が返却される","高","在庫計算"
"48","UT-PRT-048","part.models.Part","requiring_sales_orders","正常系","このパーツを必要とする販売オーダーを取得できること","オープンな販売オーダーのラインアイテムに含まれる","include_variants=True","販売オーダーセットが返却される","中","関連データ取得"
"49","UT-PRT-049","part.models.Part","required_sales_order_quantity","正常系","販売オーダーに必要な数量を計算できること","オープンな販売オーダー存在","include_variants=True","必要数量が返却される","高","在庫計算"
"50","UT-PRT-050","part.models.Part","quantity_to_order","正常系","発注が必要な数量を正しく計算すること","required=100, total_stock=50, on_order=20","なし","30が返却される","高","在庫計算"
"51","UT-PRT-051","part.models.Part","net_stock","正常系","ネット在庫が正しく計算されること","total_stock=100, allocation=30, on_order=50","なし","120が返却される","高","在庫計算"
"52","UT-PRT-052","part.models.Part","get_subscribers","正常系","パーツ購読者リストを取得できること","PartStarが存在する","include_variants=True","購読ユーザーリストが返却される","中","通知機能"
"53","UT-PRT-053","part.models.Part","is_starred_by","正常系","指定ユーザーが購読しているか判定できること","ユーザーがパーツを購読済み","user=購読ユーザー","Trueが返却される","中","通知機能"
"54","UT-PRT-054","part.models.Part","set_starred","正常系","購読状態を設定できること","購読していないユーザー","status=True","PartStarが作成される","中","通知機能"
"55","UT-PRT-055","part.models.Part","can_build","正常系","利用可能在庫でビルド可能数を計算できること","BOMアイテムと在庫存在","なし","ビルド可能数が返却される","高","在庫計算"
"56","UT-PRT-056","part.models.Part","can_build","境界値","BOMがない場合0が返却されること","assembly=Falseまたは has_bom=False","なし","0が返却される","高","在庫計算"
"57","UT-PRT-057","part.models.Part","active_builds","正常系","アクティブなビルドオーダーを取得できること","アクティブなビルドオーダー存在","なし","アクティブなビルドオーダーリスト","中","リレーション"
"58","UT-PRT-058","part.models.Part","quantity_being_built","正常系","現在ビルド中の数量を取得できること","アクティブなビルドオーダー存在","include_variants=True","ビルド中の数量","中","在庫計算"
"59","UT-PRT-059","part.models.Part","build_order_allocation_count","正常系","ビルドオーダーへの割当数量を取得できること","BuildItemによる割当存在","include_variants=True","割当数量が返却される","高","在庫計算"
"60","UT-PRT-060","part.models.Part","sales_order_allocation_count","正常系","販売オーダーへの割当数量を取得できること","SalesOrderAllocationによる割当存在","include_variants=True","割当数量が返却される","高","在庫計算"
"61","UT-PRT-061","part.models.Part","allocation_count","正常系","総割当数量を取得できること","ビルド・販売オーダー割当存在","include_variants=True","総割当数量が返却される","高","在庫計算"
"62","UT-PRT-062","part.models.Part","stock_entries","正常系","在庫エントリを正しく取得できること","StockItem存在","include_variants=True, in_stock=True","在庫エントリクエリセット","中","リレーション"
"63","UT-PRT-063","part.models.Part","get_stock_count","正常系","在庫数を正しく取得できること","StockItem存在、quantity合計=100","include_variants=True","100が返却される","高","在庫計算"
"64","UT-PRT-064","part.models.Part","total_stock","正常系","総在庫数プロパティが正しく動作すること","複数StockItem存在","なし","総在庫数が返却される","高","プロパティ"
"65","UT-PRT-065","part.models.Part","get_bom_items","正常系","BOMアイテムを取得できること","BOMアイテム存在","include_inherited=True","BOMアイテムクエリセット","中","リレーション"
"66","UT-PRT-066","part.models.Part","get_bom_items","正常系","継承BOMを含めて取得できること","親パーツにinherited BOMアイテム存在","include_inherited=True","親のBOMアイテムも含む","高","リレーション"
"67","UT-PRT-067","part.models.Part","get_used_in","正常系","このパーツを使用するアセンブリを取得できること","BomItemでsub_partとして参照されている","include_inherited=True","アセンブリパーツリスト","中","リレーション"
"68","UT-PRT-068","part.models.Part","has_bom","正常系","BOMが存在する場合Trueを返却すること","BOMアイテム存在","なし","Trueが返却される","中","プロパティ"
"69","UT-PRT-069","part.models.Part","has_bom","正常系","BOMが存在しない場合Falseを返却すること","BOMアイテム無し","なし","Falseが返却される","中","プロパティ"
"70","UT-PRT-070","part.models.Part","get_bom_hash","正常系","BOMハッシュを計算できること","BOMアイテム存在","なし","ハッシュ文字列が返却される","高","チェックサム"
"71","UT-PRT-071","part.models.Part","is_bom_valid","正常系","BOMが有効な場合Trueを返却すること","bom_checksum設定済み、ハッシュ一致","なし","Trueが返却される","高","検証"
"72","UT-PRT-072","part.models.Part","is_bom_valid","正常系","BOMが無効な場合Falseを返却すること","bom_checksum未設定またはハッシュ不一致","なし","Falseが返却される","高","検証"
"73","UT-PRT-073","part.models.Part","validate_bom","正常系","BOMを検証しチェックサムを保存できること","BOMアイテム存在","user, valid=True","bom_checksum更新、bom_validated=True","高","検証"
"74","UT-PRT-074","part.models.Part","clear_bom","正常系","BOMアイテムを全削除できること","BOMアイテム存在","なし","直接のBOMアイテムが全削除される","中","削除"
"75","UT-PRT-075","part.models.Part","pricing","正常系","PartPricingインスタンスを取得または作成できること","PartPricing存在しない","なし","新規PartPricingインスタンス","中","プロパティ"
"76","UT-PRT-076","part.models.Part","update_pricing","正常系","価格情報を更新できること","PartPricing存在","なし","価格情報が更新される","高","価格計算"
"77","UT-PRT-077","part.models.Part","get_price_range","正常系","価格範囲を取得できること","価格情報存在","quantity=1, buy=True","(min_price, max_price)タプル","高","価格計算"
"78","UT-PRT-078","part.models.Part","get_supplier_price_range","正常系","サプライヤー価格範囲を取得できること","SupplierPart、価格設定存在","quantity=1","(min_price, max_price)タプル","高","価格計算"
"79","UT-PRT-079","part.models.Part","get_bom_price_range","正常系","BOM価格範囲を取得できること","BOMアイテム、sub_partの価格情報存在","quantity=1","(min_price, max_price)タプル","高","価格計算"
"80","UT-PRT-080","part.models.Part","copy_bom_from","正常系","他パーツからBOMをコピーできること","コピー元パーツにBOM存在","other=コピー元パーツ","BOMアイテムがコピーされる","中","コピー機能"
"81","UT-PRT-081","part.models.Part","copy_bom_from","正常系","自身からのコピーは無視されること","パーツA","other=パーツA","何も変更されない","中","コピー機能"
"82","UT-PRT-082","part.models.Part","copy_tests_from","正常系","他パーツからテストテンプレートをコピーできること","コピー元パーツにテストテンプレート存在","other=コピー元パーツ","テストテンプレートがコピーされる","中","コピー機能"
"83","UT-PRT-083","part.models.Part","getTestTemplates","正常系","テストテンプレートを取得できること","PartTestTemplate存在","include_parent=True","テストテンプレートクエリセット","中","リレーション"
"84","UT-PRT-084","part.models.Part","getRequiredTests","正常系","必須テストを取得できること","required=TrueのPartTestTemplate存在","include_parent=True","必須テストクエリセット","中","リレーション"
"85","UT-PRT-085","part.models.Part","on_order","正常系","発注中の数量を正しく取得できること","オープンなPurchaseOrderLineItem存在","なし","発注中の数量","高","在庫計算"
"86","UT-PRT-086","part.models.Part","has_variants","正常系","バリアントが存在する場合Trueを返却すること","子バリアントパーツ存在","なし","Trueが返却される","中","プロパティ"
"87","UT-PRT-087","part.models.Part","get_conversion_options","正常系","バリアント変換オプションを取得できること","バリアントツリー存在","なし","変換可能パーツクエリセット","中","バリアント機能"
"88","UT-PRT-088","part.models.Part","get_related_parts","正常系","関連パーツを取得できること","PartRelated存在","なし","関連パーツセット","中","リレーション"
"89","UT-PRT-089","part.models.Part","is_part_low_on_stock","正常系","在庫が最小レベル未満の場合Trueを返却すること","get_stock_count=10, minimum_stock=50","なし","Trueが返却される","高","在庫管理"
"90","UT-PRT-090","part.models.Part","is_part_low_on_stock","正常系","在庫が最小レベル以上の場合Falseを返却すること","get_stock_count=100, minimum_stock=50","なし","Falseが返却される","高","在庫管理"
"91","UT-PRT-091","part.models.PartPricing","is_valid","正常系","updatedがNoneでない場合Trueを返却すること","updated設定済み","なし","Trueが返却される","中","プロパティ"
"92","UT-PRT-092","part.models.PartPricing","convert","正常系","通貨変換が正しく行われること","Money(100, USD)","なし","デフォルト通貨に変換されたMoney","高","通貨変換"
"93","UT-PRT-093","part.models.PartPricing","convert","異常系","変換レートがない場合Noneを返却すること","存在しない通貨ペア","なし","Noneが返却される","中","通貨変換"
"94","UT-PRT-094","part.models.PartPricing","update_bom_cost","正常系","BOMコストが正しく計算されること","assembly=True、BOMアイテム存在","save=True","bom_cost_min/maxが更新される","高","価格計算"
"95","UT-PRT-095","part.models.PartPricing","update_bom_cost","正常系","assembly=Falseの場合BOMコストはNullになること","assembly=False","save=True","bom_cost_min=None, bom_cost_max=None","中","価格計算"
"96","UT-PRT-096","part.models.PartPricing","update_purchase_cost","正常系","購入コストが正しく計算されること","完了した購入オーダーのラインアイテム存在","save=True","purchase_cost_min/maxが更新される","高","価格計算"
"97","UT-PRT-097","part.models.PartPricing","update_internal_cost","正常系","内部コストが正しく計算されること","PART_INTERNAL_PRICE=True、内部価格ブレーク存在","save=True","internal_cost_min/maxが更新される","高","価格計算"
"98","UT-PRT-098","part.models.PartPricing","update_supplier_cost","正常系","サプライヤーコストが正しく計算されること","purchaseable=True、SupplierPriceBreak存在","save=True","supplier_price_min/maxが更新される","高","価格計算"
"99","UT-PRT-099","part.models.PartPricing","update_variant_cost","正常系","バリアントコストが正しく計算されること","is_template=True、バリアント存在","save=True","variant_cost_min/maxが更新される","高","価格計算"
"100","UT-PRT-100","part.models.PartPricing","update_overall_cost","正常系","総合コストが正しく計算されること","各種コスト情報存在","なし","overall_min/maxが更新される","高","価格計算"
"101","UT-PRT-101","part.models.PartPricing","update_sale_cost","正常系","販売コストが正しく計算されること","PartSellPriceBreak存在","save=True","sale_price_min/maxが更新される","高","価格計算"
"102","UT-PRT-102","part.models.PartPricing","schedule_for_update","正常系","価格更新がスケジュールされること","PartPricing存在","counter=0","scheduled_for_update=True、タスク起動","中","タスク管理"
"103","UT-PRT-103","part.models.PartPricing","schedule_for_update","境界値","最大深度超過時はスキップされること","counter > MAX_PRICING_DEPTH","counter=51","スケジュールされない","中","タスク管理"
"104","UT-PRT-104","part.models.PartStocktake","__init__","正常系","棚卸記録が正しく作成されること","パーツ存在","part, quantity, item_count","PartStocktakeインスタンス作成","中","モデル作成"
"105","UT-PRT-105","part.models.PartSellPriceBreak","get_api_url","正常系","正しいAPIエンドポイントが返却されること","なし","なし","api-part-sale-price-listのURL","低","API"
"106","UT-PRT-106","part.models.PartInternalPriceBreak","get_api_url","正常系","正しいAPIエンドポイントが返却されること","なし","なし","api-part-internal-price-listのURL","低","API"
"107","UT-PRT-107","part.models.PartStar","__init__","正常系","パーツ購読が正しく作成されること","パーツとユーザー存在","part, user","PartStarインスタンス作成","中","モデル作成"
"108","UT-PRT-108","part.models.PartCategoryStar","__init__","正常系","カテゴリ購読が正しく作成されること","カテゴリとユーザー存在","category, user","PartCategoryStarインスタンス作成","中","モデル作成"
"109","UT-PRT-109","part.models.PartTestTemplate","save","正常系","cleanが呼ばれてから保存されること","PartTestTemplate","test_name=Test1","クリーン後に保存される","中","保存処理"
"110","UT-PRT-110","part.models.PartTestTemplate","clean","正常系","test_nameがトリムされること","test_name= Test1  (前後スペースあり)","なし","Test1にトリムされる","低","バリデーション"
"111","UT-PRT-111","part.models.PartTestTemplate","clean","正常系","keyが自動生成されること","test_name=My Test 123","なし","key=mytest123","中","バリデーション"
"112","UT-PRT-112","part.models.PartTestTemplate","clean","異常系","英数字を含まないtest_nameでValidationErrorが発生すること","test_name=---","なし","ValidationError発生","中","バリデーション"
"113","UT-PRT-113","part.models.PartTestTemplate","clean","異常系","重複するchoicesでValidationErrorが発生すること","choices=Pass,Fail,Pass","なし","ValidationError発生","中","バリデーション"
"114","UT-PRT-114","part.models.PartTestTemplate","validate_unique","異常系","testableでないパーツへのテンプレート作成でValidationErrorが発生すること","part.testable=False","なし","ValidationError発生","高","バリデーション"
"115","UT-PRT-115","part.models.PartTestTemplate","validate_unique","異常系","同じkeyのテストテンプレートが存在する場合ValidationErrorが発生すること","同一パーツツリーに同keyのテンプレート存在","なし","ValidationError発生","高","一意性制約"
"116","UT-PRT-116","part.models.PartTestTemplate","get_choices","正常系","choices文字列からリストを取得できること","choices=Pass,Fail,N/A","なし","['Pass', 'Fail', 'N/A']","中","ユーティリティ"
"117","UT-PRT-117","part.models.PartTestTemplate","get_choices","境界値","choicesが空の場合空リストを返却すること","choices=","なし","[]","中","ユーティリティ"
"118","UT-PRT-118","part.models.BomItem","__str__","正常系","文字列表現が正しく返却されること","BomItem存在","なし","'数量 x サブパーツ名 to make パーツ名'形式","低","文字列表現"
"119","UT-PRT-119","part.models.BomItem","get_assemblies","正常系","このBOMアイテムを使用するアセンブリを取得できること","inherited=True","なし","アセンブリリスト(パーツと子孫)","中","リレーション"
"120","UT-PRT-120","part.models.BomItem","get_valid_parts_for_allocation","正常系","割当可能なパーツリストを取得できること","BomItem存在、allow_variants=True","allow_substitutes=True","有効なパーツリスト","高","在庫割当"
"121","UT-PRT-121","part.models.BomItem","get_valid_parts_for_allocation","正常系","代替パーツを含めて取得できること","BomItemSubstitute存在","allow_substitutes=True","代替パーツも含むリスト","高","在庫割当"
"122","UT-PRT-122","part.models.BomItem","is_stock_item_valid","正常系","有効なStockItemを判定できること","有効なパーツのStockItem","stock_item","Trueが返却される","高","在庫割当"
"123","UT-PRT-123","part.models.BomItem","is_stock_item_valid","正常系","無効なStockItemを判定できること","無効なパーツのStockItem","stock_item","Falseが返却される","高","在庫割当"
"124","UT-PRT-124","part.models.BomItem","delete","異常系","ロックされたアセンブリのBOMアイテムは削除できないこと","part.locked=True","なし","ValidationError発生","高","データ保護"
"125","UT-PRT-125","part.models.BomItem","save","正常系","cleanが呼ばれてから保存されること","BomItem","なし","クリーン後に保存される","中","保存処理"
"126","UT-PRT-126","part.models.BomItem","save","正常系","ロックチェックが実行されること","part.locked=False","check_lock=True","正常に保存される","高","データ保護"
"127","UT-PRT-127","part.models.BomItem","save","異常系","ロックされたアセンブリへの保存でValidationErrorが発生すること","part.locked=True","check_lock=True","ValidationError発生","高","データ保護"
"128","UT-PRT-128","part.models.BomItem","check_part_lock","正常系","ロックされていないパーツは検証成功すること","assembly.locked=False","なし","例外発生せず","高","バリデーション"
"129","UT-PRT-129","part.models.BomItem","check_part_lock","異常系","ロックされたパーツでValidationErrorが発生すること","assembly.locked=True","なし","ValidationError発生","高","バリデーション"
"130","UT-PRT-130","part.models.BomItem","check_part_lock","異常系","inherited=Trueでバリアントがロックされている場合ValidationErrorが発生すること","inherited=True、バリアント.locked=True","なし","ValidationError発生","高","バリデーション"
"131","UT-PRT-131","part.models.BomItem","hash_fields","正常系","ハッシュ計算に使用するフィールドリストを返却すること","なし","なし","フィールド名リスト","低","ユーティリティ"
"132","UT-PRT-132","part.models.BomItem","get_item_hash","正常系","BOMアイテムのハッシュを計算できること","BomItem存在","なし","ハッシュ文字列","高","チェックサム"
"133","UT-PRT-133","part.models.BomItem","validate_hash","正常系","チェックサムを保存できること","BomItem存在","valid=True","checksumが更新される","高","チェックサム"
"134","UT-PRT-134","part.models.BomItem","validate_hash","正常系","チェックサムをクリアできること","BomItem存在","valid=False","checksum=''","高","チェックサム"
"135","UT-PRT-135","part.models.BomItem","is_line_valid","正常系","チェックサムが一致する場合Trueを返却すること","checksumが現在のハッシュと一致","なし","Trueが返却される","高","検証"
"136","UT-PRT-136","part.models.BomItem","is_line_valid","正常系","チェックサムが空の場合Falseを返却すること","checksum=''","なし","Falseが返却される","高","検証"
"137","UT-PRT-137","part.models.BomItem","is_line_valid","正常系","チェックサムが不一致の場合Falseを返却すること","checksumが異なる値","なし","Falseが返却される","高","検証"
"138","UT-PRT-138","part.models.BomItem","clean","異常系","自身をsub_partに設定できないこと","part=パーツA","sub_part=パーツA","ValidationError発生","高","循環参照防止"
"139","UT-PRT-139","part.models.BomItem","clean","異常系","循環参照となるsub_partを設定できないこと","sub_partがpartを使用している","なし","ValidationError発生","高","循環参照防止"
"140","UT-PRT-140","part.models.BomItem","clean","異常系","trackableなsub_partの場合quantityは整数でなければならないこと","sub_part.trackable=True","quantity=1.5","ValidationError発生","高","バリデーション"
"141","UT-PRT-141","part.models.BomItem","clean","正常系","trackableなsub_partが追加されると親パーツもtrackableになること","sub_part.trackable=True、part.trackable=False","なし","part.trackable=True","高","データ整合性"
"142","UT-PRT-142","part.models.BomItem","can_build_quantity","正常系","利用可能在庫でビルド可能数を計算できること","quantity=2, setup_quantity=1","available_stock=11","5が返却される","高","在庫計算"
"143","UT-PRT-143","part.models.BomItem","can_build_quantity","境界値","在庫不足の場合0を返却すること","quantity=10, setup_quantity=5","available_stock=4","0が返却される","高","在庫計算"
"144","UT-PRT-144","part.models.BomItem","get_required_quantity","正常系","必要数量を正しく計算できること","quantity=2, attrition=10%, setup_quantity=5","build_quantity=10","27が返却される","高","在庫計算"
"145","UT-PRT-145","part.models.BomItem","get_required_quantity","正常系","rounding_multipleが適用されること","rounding_multiple=10","build_quantity=1","切り上げた数量","高","在庫計算"
"146","UT-PRT-146","part.models.BomItem","price_range","正常系","BOMアイテムの価格範囲を取得できること","sub_part.get_price_range存在","なし","価格範囲文字列","中","価格計算"
"147","UT-PRT-147","part.models.BomItemSubstitute","save","正常系","full_cleanが呼ばれてから保存されること","BomItemSubstitute","なし","クリーン後に保存される","中","保存処理"
"148","UT-PRT-148","part.models.BomItemSubstitute","validate_unique","異常系","sub_partと同じパーツは代替として設定できないこと","bom_item.sub_part=パーツA","part=パーツA","ValidationError発生","高","バリデーション"
"149","UT-PRT-149","part.models.PartRelated","__str__","正常系","文字列表現が正しく返却されること","PartRelated存在","なし","'パーツ1 <--> パーツ2'形式","低","文字列表現"
"150","UT-PRT-150","part.models.PartRelated","save","正常系","clean・validate_uniqueが呼ばれてから保存されること","PartRelated","なし","クリーン・検証後に保存される","中","保存処理"
"151","UT-PRT-151","part.models.PartRelated","clean","異常系","自身との関連は作成できないこと","part_1=パーツA","part_2=パーツA","ValidationError発生","高","バリデーション"
"152","UT-PRT-152","part.models.PartRelated","clean","異常系","逆方向の関連が既に存在する場合エラーとなること","part_1=A, part_2=B既存","part_1=B, part_2=A","ValidationError発生","高","一意性制約"
"153","UT-PRT-153","part.tasks.notify_low_stock","","正常系","低在庫通知が送信されること","アクティブなパーツ、購読者存在","part","通知がトリガーされる","高","通知機能"
"154","UT-PRT-154","part.tasks.notify_low_stock","","正常系","非アクティブパーツは通知されないこと","active=Falseのパーツ","part","通知がトリガーされない","中","通知機能"
"155","UT-PRT-155","part.tasks.notify_low_stock_if_required","","正常系","低在庫時に通知タスクが起動されること","is_part_low_on_stock=True","part_id","notify_low_stockがオフロードされる","高","通知機能"
"156","UT-PRT-156","part.tasks.notify_low_stock_if_required","","正常系","在庫十分時は通知されないこと","is_part_low_on_stock=False","part_id","通知がトリガーされない","高","通知機能"
"157","UT-PRT-157","part.tasks.update_part_pricing","","正常系","価格更新が実行されること","PartPricing存在","pricing","update_pricingが呼ばれる","高","価格計算"
"158","UT-PRT-158","part.tasks.check_missing_pricing","","正常系","価格情報のないパーツが検出されること","pricing_data=Noneのパーツ存在","limit=250","スケジュール更新が実行される","中","価格計算"
"159","UT-PRT-159","part.tasks.rebuild_supplier_parts","","正常系","SupplierPartが再保存されること","SupplierPart存在","part_id","full_clean・saveが呼ばれる","中","データ同期"
"160","UT-PRT-160","part.tasks.check_bom_valid","","正常系","BOMチェックサムが再計算されること","パーツ存在","part_id","bom_validatedが更新される","高","検証"
"161","UT-PRT-161","part.tasks.validate_bom","","正常系","BOM検証が実行されること","パーツ存在","part_id, valid=True, user_id","validate_bomが呼ばれる","高","検証"
"162","UT-PRT-162","part.helpers.compile_full_name_template","","正常系","テンプレートがコンパイルされること","PART_NAME_FORMAT設定済み","なし","Templateオブジェクト","中","ユーティリティ"
"163","UT-PRT-163","part.helpers.compile_full_name_template","","正常系","キャッシュが機能すること","同じテンプレート文字列で2回呼び出し","なし","キャッシュされたテンプレートが返却される","低","ユーティリティ"
"164","UT-PRT-164","part.helpers.render_part_full_name","","正常系","パーツのフルネームがレンダリングされること","テンプレート設定済み","part","フォーマットされた名前","中","ユーティリティ"
"165","UT-PRT-165","part.helpers.render_part_full_name","","正常系","テンプレートエラー時はフォールバックが使用されること","無効なテンプレート","part","IPN | name | revision形式","中","ユーティリティ"
"166","UT-PRT-166","part.helpers.get_part_image_directory","","正常系","パーツ画像ディレクトリパスが返却されること","なし","なし","MEDIA_ROOT/part_imagesパス","低","ユーティリティ"
"167","UT-PRT-167","part.helpers.get_part_image_directory","","正常系","ディレクトリが存在しない場合作成されること","ディレクトリ未存在","なし","ディレクトリが作成される","低","ユーティリティ"
"168","UT-PRT-168","part.stocktake.perform_stocktake","","正常系","アクティブパーツの棚卸エントリが作成されること","STOCKTAKE_ENABLE=True、アクティブパーツ存在","なし","PartStocktakeレコード作成","高","棚卸機能"
"169","UT-PRT-169","part.stocktake.perform_stocktake","","正常系","STOCKTAKE_ENABLE=Falseの場合何もしないこと","STOCKTAKE_ENABLE=False","なし","処理がスキップされる","中","棚卸機能"
"170","UT-PRT-170","part.stocktake.perform_stocktake","","正常系","当日既に棚卸済みのパーツはスキップされること","当日のPartStocktake存在","なし","新規レコード作成されない","中","棚卸機能"
