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
|
|
|
|
|
2021-12-01 12:02:21 +01:00
|
|
|
def test_halfapi_dummy_domain(dummy_domain):
|
2021-11-22 18:08:02 +01:00
|
|
|
with patch('starlette.applications.Starlette') as mock:
|
|
|
|
mock.return_value = MagicMock()
|
2021-12-03 17:25:57 +01:00
|
|
|
config = {}
|
|
|
|
config['domain'] = {}
|
|
|
|
config['domain'][dummy_domain['name']] = dummy_domain
|
2021-12-07 11:42:02 +01:00
|
|
|
print(config)
|
2021-12-03 17:25:57 +01:00
|
|
|
halfapi = HalfAPI(config)
|