mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-23 12:50:18 +08:00
Fix frontend manager test patch
This commit is contained in:
parent
52230c24f2
commit
d2acf8a93f
@ -87,15 +87,15 @@ def test_init_frontend_invalid_provider():
|
|||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def mock_os_functions():
|
def mock_os_functions():
|
||||||
with patch('app.frontend_management.os.makedirs') as mock_makedirs, \
|
with patch('comfy.app.frontend_management.os.makedirs') as mock_makedirs, \
|
||||||
patch('app.frontend_management.os.listdir') as mock_listdir, \
|
patch('comfy.app.frontend_management.os.listdir') as mock_listdir, \
|
||||||
patch('app.frontend_management.os.rmdir') as mock_rmdir:
|
patch('comfy.app.frontend_management.os.rmdir') as mock_rmdir:
|
||||||
mock_listdir.return_value = [] # Simulate empty directory
|
mock_listdir.return_value = [] # Simulate empty directory
|
||||||
yield mock_makedirs, mock_listdir, mock_rmdir
|
yield mock_makedirs, mock_listdir, mock_rmdir
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def mock_download():
|
def mock_download():
|
||||||
with patch('app.frontend_management.download_release_asset_zip') as mock:
|
with patch('comfy.app.frontend_management.download_release_asset_zip') as mock:
|
||||||
mock.side_effect = Exception("Download failed") # Simulate download failure
|
mock.side_effect = Exception("Download failed") # Simulate download failure
|
||||||
yield mock
|
yield mock
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user