Expand server test coverage from 66% to 73%
Add comprehensive tests for: - Download routes helper functions (_format_size, _get_output_dir, _resolve_version_id) - Background download task execution (success, failure, exception handling) - Progress callback with different sizes (bytes, KB, MB, GB) - Auto-linking downloaded files to CivitAI - Database file lookup and linking with CivitAI matches - CivitAI cache failure handling - Gallery edge cases and metadata operations - Server initialization and OpenAPI schema Server module coverage now: - auth.py: 100% - civitai_routes.py: 98% - db_routes.py: 97% - download_routes.py: 98% - gallery_routes.py: 98% - gallery.py: 95% Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -230,7 +230,7 @@ class TestEnums:
|
|||||||
assert BaseModel.sd15.to_api() == "SD 1.5"
|
assert BaseModel.sd15.to_api() == "SD 1.5"
|
||||||
assert BaseModel.sdxl.to_api() == "SDXL 1.0"
|
assert BaseModel.sdxl.to_api() == "SDXL 1.0"
|
||||||
assert BaseModel.pony.to_api() == "Pony"
|
assert BaseModel.pony.to_api() == "Pony"
|
||||||
assert BaseModel.flux.to_api() == "Flux.1 D"
|
assert BaseModel.flux_dev.to_api() == "Flux.1 D"
|
||||||
assert BaseModel.illustrious.to_api() == "Illustrious"
|
assert BaseModel.illustrious.to_api() == "Illustrious"
|
||||||
|
|
||||||
def test_sort_order_to_api(self) -> None:
|
def test_sort_order_to_api(self) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user