1
0
favro-sync/test/test_client.py
2024-09-28 14:13:09 +02:00

30 lines
792 B
Python

from favro_sync import secrets
from favro_sync.favro_client import FavroClient, OrganizationId, SeqId
# TODO: Skip if no secrets
def test_create_client():
client = FavroClient(
favro_org_id=OrganizationId(secrets.favro_org_id()),
favro_username=secrets.favro_username(),
favro_password=secrets.favro_password(),
read_only=True,
)
assert client is not None
client.check_logged_in()
return client
def test_get_card():
client = test_create_client()
card = client.get_card(SeqId(11368))
print(card)
assert card is not None
assert card.name is not None
assert card.detailed_description is not None
assert len(card.dependencies) == 1
assert len(card.attachments) == 0
assert len(card.custom_fields) == 2