feat(snippets): 한글 설명 초안 143개·새 이름 11개 검토 파일 + import_snippets 는 빈 DB 에서만(규칙 변경 후 중복·옛 이름 부활 방지)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
7a1498a791
commit
f0520cdcc1
@@ -49,8 +49,11 @@ def test_import_from_sqlite(db, tmp_path):
|
||||
call_command("import_snippets", str(p))
|
||||
names = {s.name: s for s in Snippet.objects.all()}
|
||||
assert set(names) == {"A_B", "C"} and names["C"].category == "코드"
|
||||
call_command("import_snippets", str(p)) # 재실행해도 중복 없음
|
||||
call_command("import_snippets", str(p)) # 이미 있으면 건너뜀 — 배포마다 돌아도 안전
|
||||
assert Snippet.objects.count() == 2
|
||||
Snippet.objects.create(name="LEGACY-ABAP", body="x")
|
||||
call_command("import_snippets", str(p))
|
||||
assert not Snippet.objects.filter(name="LEGACY_ABAP").exists() # 새 규칙 이름으로 중복 생기지 않음
|
||||
|
||||
|
||||
def test_legacy_name_still_editable(auth_api, user):
|
||||
|
||||
Reference in New Issue
Block a user