This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
devicehub-teal/tests/test_organization.py

19 lines
665 B
Python
Raw Normal View History

2018-06-10 16:47:49 +00:00
from uuid import UUID
import pytest
from ereuse_devicehub.config import DevicehubConfig
from ereuse_devicehub.resources.user import Organization
@pytest.mark.usefixtures('app_context')
def test_default_org_exists(config: DevicehubConfig):
"""
Ensures that the default organization is created on app
initialization and that is accessible for the method
:meth:`ereuse_devicehub.resources.user.Organization.get_default_org`.
"""
assert Organization.query.filter_by(name=config.ORGANIZATION_NAME,
tax_id=config.ORGANIZATION_TAX_ID).one()
2018-06-10 16:47:49 +00:00
assert isinstance(Organization.get_default_org_id(), UUID)