Fix tests

This commit is contained in:
doctorpangloss
2024-08-25 19:55:18 -07:00
parent c4fe16252b
commit 69e6d52301
5 changed files with 13 additions and 31 deletions
-26
View File
@@ -1,26 +0,0 @@
# Automated Testing
## Running tests locally
Additional requirements for running tests:
```
pip install .[dev]
```
Run inference tests:
```
pytest tests/inference
```
## Quality regression test
Compares images in 2 directories to ensure they are the same
1) Run an inference test to save a directory of "ground truth" images
```
pytest tests/inference --output_dir tests/inference/baseline
```
2) Make code edits
3) Run inference and quality comparison tests
```
pytest
```
@@ -98,7 +98,7 @@ async def test_routes_added_to_app(aiohttp_client_factory, internal_routes):
@pytest.mark.asyncio
async def test_file_service_initialization():
with patch('api_server.routes.internal.internal_routes.FileService') as MockFileService:
with patch('comfy.api_server.routes.internal.internal_routes.FileService') as MockFileService:
# Create a mock instance
mock_file_service_instance = MagicMock(spec=FileService)
MockFileService.return_value = mock_file_service_instance