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.
2018-06-10 16:47:49 +00:00
|
|
|
from uuid import UUID
|
|
|
|
|
2018-05-30 10:49:40 +00:00
|
|
|
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)
|