28 lines
812 B
Python
28 lines
812 B
Python
#!/usr/bin/env python3
|
|
from app.langgraph_tools.tools.orders.order_tools_2 import create_party
|
|
import json
|
|
|
|
# Prueba de la función create_party
|
|
def test_create_party():
|
|
# Parámetros de ejemplo
|
|
party_full_name = "Cristian Garces"
|
|
contact_method_type = "email"
|
|
contact_method_value = "cristian.garces@example.com"
|
|
|
|
# Llamar a la función
|
|
response = create_party(
|
|
party_full_name=party_full_name,
|
|
contact_method_type=contact_method_type,
|
|
contact_method_value=contact_method_value
|
|
)
|
|
|
|
# Imprimir la respuesta
|
|
print("Status Code:", response.status_code)
|
|
try:
|
|
print("Response:", json.loads(response.text))
|
|
except json.JSONDecodeError:
|
|
print("Raw Response:", response.text)
|
|
|
|
if __name__ == "__main__":
|
|
test_create_party()
|