Skip to content

Commit

Permalink
Remove unique names where appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
smokestacklightnin committed Feb 1, 2025
1 parent f4028fd commit 6abfb00
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tests/deploy/api/test_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def test_unknown_component(tmp_local_root):
config = Config(local_root=tmp_local_root)

document_root = config.local_root / "documents"
document_root.mkdir(exist_ok=True)
document_path = document_root / "test_unknown_component.txt"
document_root.mkdir()
document_path = document_root / "test.txt"
with open(document_path, "w") as file:
file.write("!\n")

Expand Down
13 changes: 6 additions & 7 deletions tests/deploy/api/test_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ def test_get_documents(tmp_local_root):
needs_more_of = ["reverb", "cowbell"]

document_root = config.local_root / "documents"
document_root.mkdir(exist_ok=True)
document_root.mkdir()
document_paths = [
document_root / f"test_get_documents_{what_it_needs}.txt"
for what_it_needs in needs_more_of
document_root / f"test{counter}.txt" for counter in range(len(needs_more_of))
]
for what_it_needs, document_path in zip(needs_more_of, document_paths):
with open(document_path, "w") as file:
Expand Down Expand Up @@ -59,8 +58,8 @@ def test_get_document(tmp_local_root):
config = Config(local_root=tmp_local_root)

document_root = config.local_root / "documents"
document_root.mkdir(exist_ok=True)
document_path = document_root / "test_get_document.txt"
document_root.mkdir()
document_path = document_root / "test.txt"
with open(document_path, "w") as file:
file.write("Needs more reverb\n")

Expand Down Expand Up @@ -91,8 +90,8 @@ def test_get_document_content(tmp_local_root):
config = Config(local_root=tmp_local_root)

document_root = config.local_root / "documents"
document_root.mkdir(exist_ok=True)
document_path = document_root / "test_get_document_content.txt"
document_root.mkdir()
document_path = document_root / "test.txt"
with open(document_path, "w") as file:
file.write("Needs more reverb\n")

Expand Down

0 comments on commit 6abfb00

Please sign in to comment.