fix
This commit is contained in:
parent
a607d8f213
commit
96ab005d4e
1 changed files with 6 additions and 1 deletions
|
|
@ -379,10 +379,15 @@ class TestCognifyCommandEdgeCases:
|
||||||
class TestDeleteCommandEdgeCases:
|
class TestDeleteCommandEdgeCases:
|
||||||
"""Test edge cases for DeleteCommand"""
|
"""Test edge cases for DeleteCommand"""
|
||||||
|
|
||||||
|
@patch("cognee.cli.commands.delete_command.get_deletion_counts")
|
||||||
@patch("cognee.cli.commands.delete_command.fmt.confirm")
|
@patch("cognee.cli.commands.delete_command.fmt.confirm")
|
||||||
@patch("cognee.cli.commands.delete_command.asyncio.run", side_effect=_mock_run)
|
@patch("cognee.cli.commands.delete_command.asyncio.run", side_effect=_mock_run)
|
||||||
def test_delete_all_with_user_id(self, mock_asyncio_run, mock_confirm):
|
def test_delete_all_with_user_id(
|
||||||
|
self, mock_asyncio_run, mock_confirm, mock_get_deletion_counts
|
||||||
|
):
|
||||||
"""Test delete command with both --all and --user-id"""
|
"""Test delete command with both --all and --user-id"""
|
||||||
|
mock_get_deletion_counts.return_value = DeletionCountsPreview()
|
||||||
|
|
||||||
# Mock the cognee module
|
# Mock the cognee module
|
||||||
mock_cognee = MagicMock()
|
mock_cognee = MagicMock()
|
||||||
mock_cognee.delete = AsyncMock()
|
mock_cognee.delete = AsyncMock()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue