1
0
favro-sync/test/test_client.py

30 lines
792 B
Python
Raw Normal View History

from favro_sync import secrets
2024-09-28 12:10:13 +00:00
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()
2024-09-28 12:10:13 +00:00
card = client.get_card(SeqId(11368))
print(card)
assert card is not None
2024-09-28 12:10:13 +00:00
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