Published and fixed tests

This commit is contained in:
simonwt 2026-04-02 16:57:24 +01:00
parent 8af675d341
commit c6c7e7bb28
35 changed files with 15 additions and 6 deletions

View file

@ -10,3 +10,7 @@ dependencies = [
"requests>=2.33.1",
"simplejson>=3.20.2",
]
[build-system]
requires = ["uv_build >= 0.10.10, <0.11.0"]
build-backend = "uv_build"

View file

@ -1,6 +1,9 @@
"""
Demonstrate basic usage
"""
import sys
# Add the src directory to the Python path so we can import the API client and wrappers
sys.path.insert(0, './src/')
from trustcafeapiwrapper import APIClient
import os, simplejson as json
@ -46,9 +49,9 @@ def save_response(response):
print("-----------Get a user profile----------------")
profile = API.run_job('userprofile.get', "simon-little")
print(profile)
# print("-----------Get a user profile----------------")
# profile = API.run_job('userprofile.get', "simon-little")
# print(profile)
# print("-------------- Get a branch -----------------")
# branch = API.run_job('branch.get', "music")
# print(branch)
@ -156,6 +159,6 @@ from trustcafeapiwrapper.wrappers.post.create_post import create_post
# )
# save_response(API.run_job(**wrapped))
save_response(API.wrapped(create_post(
"This is a test post created via the create_post wrapper function.",
)))
# save_response(API.wrapped(create_post(
# "This is a test post created via the create_post wrapper function.",
# )))

View file

@ -1,3 +1,5 @@
import sys
sys.path.insert(0, './src/')
import unittest
from tests.wrappers.create_post import TestCreatePost