2021-11-22 18:08:02 +01:00
|
|
|
import os
|
|
|
|
from starlette.applications import Starlette
|
|
|
|
from unittest.mock import MagicMock, patch
|
|
|
|
from halfapi.halfapi import HalfAPI
|
|
|
|
|
|
|
|
from halfapi.lib.domain import NoDomainsException
|
|
|
|
|
|
|
|
def test_halfapi_dummy_domain():
|
|
|
|
with patch('starlette.applications.Starlette') as mock:
|
|
|
|
mock.return_value = MagicMock()
|
|
|
|
halfapi = HalfAPI({
|
2021-11-30 18:31:40 +01:00
|
|
|
'domain': {
|
|
|
|
'name': 'dummy_domain',
|
|
|
|
'router': 'routers'
|
2021-11-22 18:08:02 +01:00
|
|
|
}
|
|
|
|
})
|