Published and fixed tests
This commit is contained in:
parent
8af675d341
commit
c6c7e7bb28
35 changed files with 15 additions and 6 deletions
|
|
@ -10,3 +10,7 @@ dependencies = [
|
||||||
"requests>=2.33.1",
|
"requests>=2.33.1",
|
||||||
"simplejson>=3.20.2",
|
"simplejson>=3.20.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
requires = ["uv_build >= 0.10.10, <0.11.0"]
|
||||||
|
build-backend = "uv_build"
|
||||||
15
testing.py
15
testing.py
|
|
@ -1,6 +1,9 @@
|
||||||
"""
|
"""
|
||||||
Demonstrate basic usage
|
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
|
from trustcafeapiwrapper import APIClient
|
||||||
import os, simplejson as json
|
import os, simplejson as json
|
||||||
|
|
||||||
|
|
@ -46,9 +49,9 @@ def save_response(response):
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print("-----------Get a user profile----------------")
|
# print("-----------Get a user profile----------------")
|
||||||
profile = API.run_job('userprofile.get', "simon-little")
|
# profile = API.run_job('userprofile.get', "simon-little")
|
||||||
print(profile)
|
# print(profile)
|
||||||
# print("-------------- Get a branch -----------------")
|
# print("-------------- Get a branch -----------------")
|
||||||
# branch = API.run_job('branch.get', "music")
|
# branch = API.run_job('branch.get', "music")
|
||||||
# print(branch)
|
# print(branch)
|
||||||
|
|
@ -156,6 +159,6 @@ from trustcafeapiwrapper.wrappers.post.create_post import create_post
|
||||||
# )
|
# )
|
||||||
# save_response(API.run_job(**wrapped))
|
# save_response(API.run_job(**wrapped))
|
||||||
|
|
||||||
save_response(API.wrapped(create_post(
|
# save_response(API.wrapped(create_post(
|
||||||
"This is a test post created via the create_post wrapper function.",
|
# "This is a test post created via the create_post wrapper function.",
|
||||||
)))
|
# )))
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
import sys
|
||||||
|
sys.path.insert(0, './src/')
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
from tests.wrappers.create_post import TestCreatePost
|
from tests.wrappers.create_post import TestCreatePost
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue