[dummy_domain] set an id to dummy_domain
This commit is contained in:
parent
c658815eb5
commit
648841d90f
|
@ -122,10 +122,10 @@ class HalfAPI:
|
|||
logger.debug('Mounting domain %s on %s', domain.get('name'), path)
|
||||
self.__application.mount(path,
|
||||
HalfDomain(
|
||||
self.application,
|
||||
domain.get('name', key),
|
||||
domain.get('router'),
|
||||
config=domain.get('config', {})
|
||||
domain.get('config', {}),
|
||||
self.application
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -39,6 +39,7 @@ ROUTE_SCHEMA = Schema({
|
|||
|
||||
DOMAIN_SCHEMA = Schema({
|
||||
'name': str,
|
||||
'id': str,
|
||||
Optional('routers'): str,
|
||||
Optional('version'): str,
|
||||
Optional('patch_release'): str,
|
||||
|
|
|
@ -279,8 +279,8 @@ def application_debug(project_runner):
|
|||
'production':False,
|
||||
'domain': {
|
||||
'dummy_domain': {
|
||||
'name': 'test_domain',
|
||||
'router': 'test_domain.routers',
|
||||
'name': 'dummy_domain',
|
||||
'router': '.routers',
|
||||
'enabled': True,
|
||||
'prefix': False,
|
||||
'config':{
|
||||
|
|
|
@ -2,4 +2,5 @@ __name__ = 'dummy_domain'
|
|||
__version__ = '0.0.0'
|
||||
__patch_release__ = '0.0.0'
|
||||
__routers__ = '.routers'
|
||||
__id__ = '8b88e60a625369235b36c2d6d70756a0c02c1c7fb169fcee6dc820bcf9723f5a'
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import subprocess
|
|||
import json
|
||||
import os
|
||||
import sys
|
||||
import pprint
|
||||
from halfapi.lib.constants import API_SCHEMA
|
||||
|
||||
|
||||
|
@ -25,10 +26,9 @@ def test_routes(application_debug):
|
|||
r = c.get('/halfapi/error/500')
|
||||
assert r.status_code == 500
|
||||
r = c.get('/')
|
||||
print(r.content)
|
||||
d_r = r.json()
|
||||
assert isinstance(d_r, dict)
|
||||
# assert API_SCHEMA.validate(d_r)
|
||||
assert API_SCHEMA.validate(d_r)
|
||||
|
||||
"""
|
||||
TODO: Find a way to test exception raising
|
||||
|
|
Loading…
Reference in New Issue