fix: fixes create_cognee_style_network_with_logo unit test
This commit is contained in:
parent
18c8bc3c33
commit
e449286f50
1 changed files with 4 additions and 4 deletions
|
|
@ -102,8 +102,8 @@ def test_prepare_nodes():
|
||||||
assert isinstance(nodes_df, pd.DataFrame)
|
assert isinstance(nodes_df, pd.DataFrame)
|
||||||
assert len(nodes_df) == 1
|
assert len(nodes_df) == 1
|
||||||
|
|
||||||
|
@pytest.mark.asyncio
|
||||||
def test_create_cognee_style_network_with_logo():
|
async def test_create_cognee_style_network_with_logo():
|
||||||
import networkx as nx
|
import networkx as nx
|
||||||
from unittest.mock import patch
|
from unittest.mock import patch
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
|
@ -125,15 +125,15 @@ def test_create_cognee_style_network_with_logo():
|
||||||
return original_open(*args, **kwargs)
|
return original_open(*args, **kwargs)
|
||||||
|
|
||||||
with patch("builtins.open", side_effect=mock_open_read_side_effect):
|
with patch("builtins.open", side_effect=mock_open_read_side_effect):
|
||||||
result = create_cognee_style_network_with_logo(
|
result = await create_cognee_style_network_with_logo(
|
||||||
graph_tuple,
|
graph_tuple,
|
||||||
title="Test Network",
|
title="Test Network",
|
||||||
node_attribute="group",
|
|
||||||
layout_func=nx.spring_layout,
|
layout_func=nx.spring_layout,
|
||||||
layout_scale=3.0,
|
layout_scale=3.0,
|
||||||
logo_alpha=0.5,
|
logo_alpha=0.5,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
print(result)
|
||||||
assert result is not None
|
assert result is not None
|
||||||
assert isinstance(result, str)
|
assert isinstance(result, str)
|
||||||
assert len(result) > 0
|
assert len(result) > 0
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue