-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Updated agents-api/agents_api/common/utils/c
- Loading branch information
1 parent
66cc905
commit fa356d8
Showing
1 changed file
with
5 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
#!/usr/bin/env python3 | ||
|
||
"""This module provides utility functions for interacting with the Cozo API client, including data mutation processes.""" | ||
|
||
from types import SimpleNamespace | ||
|
||
from pycozo import Client | ||
|
||
# Define a mock client for testing purposes, simulating Cozo API client behavior. | ||
_fake_client = SimpleNamespace() | ||
# Lambda function to process and mutate data dictionaries using the Cozo client's internal method. This is a workaround to access protected member functions for testing. | ||
_fake_client._process_mutate_data_dict = lambda data: ( | ||
Client._process_mutate_data_dict(_fake_client, data) | ||
) | ||
|
||
# Public interface to process and mutate data using the Cozo client. It wraps the client's internal processing method for external use. | ||
cozo_process_mutate_data = _fake_client._process_mutate_data = lambda data: ( | ||
Client._process_mutate_data(_fake_client, data) | ||
) |