gizatechxyz / giza-agents

Easy to use Verifiable AI and smart contracts interoperability.
https://docs.gizatech.xyz/products/ai-agents
MIT License
14 stars 10 forks source link

Add tests for `utils.py` #35

Closed Gonmeso closed 5 months ago

Gonmeso commented 5 months ago

Currently, only models.py and agents.py have some kind of testing, the focus of this issue is to add tests to the utils.py script.

Some tips on this:

An example:

from giza.schemas import SchemaClass

schema_object = SchemaClass(
    ...
)

@patch("giza_actions.utils.ClientToPatch.method", return_value=schema_object)
def test_something(mock_schema):
    # Test Here
    ...
    # Assert result
    mock_schema.assert_called_once()
stevencartavia commented 5 months ago

Hi, can I take this?

adrianvrj commented 5 months ago

Hello, can I hop on this?

EmmanuelAR commented 5 months ago

Hey @Gonmeso , i can help too to add some test!! Is still posible? We can, between the 3 of us (we are from Costa Rica), divide the methods to test them, it could be a solution

raphaelDkhn commented 5 months ago

Hey guys ODHack just opened, I can assign it to you :)

Would you like me to create a group so that you can communicate on this PR?

EmmanuelAR commented 5 months ago

Sure, excellent, let us create a group and divided the work, thanks @raphaelDkhn!!

EmmanuelAR commented 5 months ago

Hey @raphaelDkhn we see that there are three methods to test in utils.py, so we decided to devided in this way:

EmmanuelAR commented 5 months ago

Hey team! Heres my Pr from my part team https://github.com/gizatechxyz/actions-sdk/pull/43 Any question, let me know! 😄

cc @Gonmeso @adrianvrj @stevencartavia

Gonmeso commented 5 months ago

Fixed in #45 #43 #42