Improved testing
This commit is contained in:
33
src/tests/hosting/app_host.py
Normal file
33
src/tests/hosting/app_host.py
Normal file
@@ -0,0 +1,33 @@
|
||||
import unittest
|
||||
import datetime
|
||||
|
||||
from sh_edraft.configuration.base import ConfigurationBase
|
||||
from sh_edraft.hosting import ApplicationHost
|
||||
from sh_edraft.hosting.base import ApplicationRuntimeBase
|
||||
from sh_edraft.service.base import ServiceProviderBase
|
||||
|
||||
|
||||
class AppHostTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def test_create(self):
|
||||
print(f'{__name__}.test_create:')
|
||||
app_host = ApplicationHost()
|
||||
self.assertIsNotNone(app_host)
|
||||
app_host.create()
|
||||
|
||||
self.assertIsNotNone(app_host.configuration)
|
||||
self.assertTrue(isinstance(app_host.configuration, ConfigurationBase))
|
||||
|
||||
self.assertIsNotNone(app_host.application_runtime)
|
||||
self.assertTrue(isinstance(app_host.application_runtime, ApplicationRuntimeBase))
|
||||
|
||||
self.assertIsNotNone(app_host.services)
|
||||
self.assertTrue(isinstance(app_host.services, ServiceProviderBase))
|
||||
|
||||
self.assertIsNotNone(app_host._start_time)
|
||||
self.assertTrue(isinstance(app_host._start_time, datetime.datetime))
|
||||
self.assertIsNotNone(app_host._end_time)
|
||||
self.assertTrue(isinstance(app_host._end_time, datetime.datetime))
|
||||
Reference in New Issue
Block a user