orionis 0.546.0__py3-none-any.whl → 0.548.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- orionis/console/base/scheduler_event_listener.py +0 -17
- orionis/console/contracts/schedule_event_listener.py +0 -18
- orionis/foundation/config/app/entities/app.py +3 -2
- orionis/foundation/config/app/enums/ciphers.py +5 -19
- orionis/foundation/config/session/entities/session.py +2 -2
- orionis/metadata/framework.py +1 -1
- orionis/services/encrypter/encrypter.py +115 -0
- orionis/services/environment/dynamic/caster.py +35 -27
- orionis/services/environment/key/key_generator.py +32 -11
- {orionis-0.546.0.dist-info → orionis-0.548.0.dist-info}/METADATA +1 -1
- {orionis-0.546.0.dist-info → orionis-0.548.0.dist-info}/RECORD +14 -159
- {orionis-0.546.0.dist-info → orionis-0.548.0.dist-info}/top_level.txt +0 -1
- orionis-0.546.0.dist-info/zip-safe +0 -1
- tests/container/__init__.py +0 -0
- tests/container/context/__init__.py +0 -0
- tests/container/context/test_manager.py +0 -38
- tests/container/context/test_scope.py +0 -32
- tests/container/core/__init__.py +0 -0
- tests/container/core/test_advanced_async.py +0 -234
- tests/container/core/test_async_optimizations.py +0 -268
- tests/container/core/test_container.py +0 -453
- tests/container/core/test_singleton.py +0 -122
- tests/container/core/test_thread_safety.py +0 -90
- tests/container/entities/__init__.py +0 -0
- tests/container/entities/test_binding.py +0 -242
- tests/container/enums/__init__.py +0 -0
- tests/container/enums/test_lifetimes.py +0 -97
- tests/container/facades/__init__.py +0 -0
- tests/container/facades/test_facade.py +0 -78
- tests/container/mocks/__init__.py +0 -0
- tests/container/mocks/mock_advanced_async.py +0 -332
- tests/container/mocks/mock_async_optimizations.py +0 -407
- tests/container/mocks/mock_auto_resolution.py +0 -192
- tests/container/mocks/mock_complex_classes.py +0 -792
- tests/container/mocks/mock_simple_classes.py +0 -98
- tests/container/providers/__init__.py +0 -0
- tests/container/providers/test_providers.py +0 -55
- tests/container/validators/__init__.py +0 -0
- tests/container/validators/test_implements.py +0 -186
- tests/container/validators/test_is_abstract_class.py +0 -147
- tests/container/validators/test_is_callable.py +0 -102
- tests/container/validators/test_is_concrete_class.py +0 -160
- tests/container/validators/test_is_instance.py +0 -150
- tests/container/validators/test_is_not_subclass.py +0 -49
- tests/container/validators/test_is_subclass.py +0 -178
- tests/container/validators/test_is_valid_alias.py +0 -147
- tests/container/validators/test_lifetime.py +0 -106
- tests/example/__init__.py +0 -0
- tests/example/test_example.py +0 -725
- tests/foundation/__init__.py +0 -0
- tests/foundation/config/__init__.py +0 -0
- tests/foundation/config/app/__init__.py +0 -0
- tests/foundation/config/app/test_foundation_config_app.py +0 -262
- tests/foundation/config/auth/__init__.py +0 -0
- tests/foundation/config/auth/test_foundation_config_auth.py +0 -29
- tests/foundation/config/cache/__init__.py +0 -0
- tests/foundation/config/cache/test_foundation_config_cache.py +0 -143
- tests/foundation/config/cache/test_foundation_config_cache_file.py +0 -126
- tests/foundation/config/cache/test_foundation_config_cache_stores.py +0 -156
- tests/foundation/config/cors/__init__.py +0 -0
- tests/foundation/config/cors/test_foundation_config_cors.py +0 -190
- tests/foundation/config/database/__init__.py +0 -0
- tests/foundation/config/database/test_foundation_config_database.py +0 -158
- tests/foundation/config/database/test_foundation_config_database_connections.py +0 -203
- tests/foundation/config/database/test_foundation_config_database_mysql.py +0 -354
- tests/foundation/config/database/test_foundation_config_database_oracle.py +0 -288
- tests/foundation/config/database/test_foundation_config_database_pgsql.py +0 -257
- tests/foundation/config/database/test_foundation_config_database_sqlite.py +0 -207
- tests/foundation/config/filesystems/__init__.py +0 -0
- tests/foundation/config/filesystems/test_foundation_config_filesystems.py +0 -160
- tests/foundation/config/filesystems/test_foundation_config_filesystems_aws.py +0 -189
- tests/foundation/config/filesystems/test_foundation_config_filesystems_disks.py +0 -184
- tests/foundation/config/filesystems/test_foundation_config_filesystems_local.py +0 -143
- tests/foundation/config/filesystems/test_foundation_config_filesystems_public.py +0 -184
- tests/foundation/config/logging/__init__.py +0 -0
- tests/foundation/config/logging/test_foundation_config_logging.py +0 -112
- tests/foundation/config/logging/test_foundation_config_logging_channels.py +0 -246
- tests/foundation/config/logging/test_foundation_config_logging_chunked.py +0 -217
- tests/foundation/config/logging/test_foundation_config_logging_daily.py +0 -220
- tests/foundation/config/logging/test_foundation_config_logging_hourly.py +0 -196
- tests/foundation/config/logging/test_foundation_config_logging_monthly.py +0 -214
- tests/foundation/config/logging/test_foundation_config_logging_stack.py +0 -178
- tests/foundation/config/logging/test_foundation_config_logging_weekly.py +0 -224
- tests/foundation/config/mail/__init__.py +0 -0
- tests/foundation/config/mail/test_foundation_config_mail.py +0 -145
- tests/foundation/config/mail/test_foundation_config_mail_file.py +0 -97
- tests/foundation/config/mail/test_foundation_config_mail_mailers.py +0 -106
- tests/foundation/config/mail/test_foundation_config_mail_smtp.py +0 -146
- tests/foundation/config/queue/__init__.py +0 -0
- tests/foundation/config/queue/test_foundation_config_queue.py +0 -88
- tests/foundation/config/queue/test_foundation_config_queue_brokers.py +0 -72
- tests/foundation/config/queue/test_foundation_config_queue_database.py +0 -134
- tests/foundation/config/root/__init__.py +0 -0
- tests/foundation/config/root/test_foundation_config_root_paths.py +0 -112
- tests/foundation/config/session/__init__.py +0 -0
- tests/foundation/config/session/test_foundation_config_session.py +0 -213
- tests/foundation/config/startup/__init__.py +0 -0
- tests/foundation/config/startup/test_foundation_config_startup.py +0 -202
- tests/foundation/config/testing/__init__.py +0 -0
- tests/foundation/config/testing/test_foundation_config_testing.py +0 -235
- tests/metadata/__init__.py +0 -0
- tests/metadata/test_metadata_framework.py +0 -140
- tests/metadata/test_metadata_package.py +0 -139
- tests/services/__init__.py +0 -0
- tests/services/asynchrony/__init__.py +0 -0
- tests/services/asynchrony/test_services_asynchrony_coroutine.py +0 -85
- tests/services/environment/__init__.py +0 -0
- tests/services/environment/test_services_environment.py +0 -226
- tests/services/introspection/__init__.py +0 -0
- tests/services/introspection/dependencies/__init__.py +0 -0
- tests/services/introspection/dependencies/mocks/__init__.py +0 -0
- tests/services/introspection/dependencies/mocks/mock_user.py +0 -30
- tests/services/introspection/dependencies/mocks/mock_user_controller.py +0 -27
- tests/services/introspection/dependencies/mocks/mock_users_permissions.py +0 -41
- tests/services/introspection/dependencies/test_reflect_dependencies.py +0 -261
- tests/services/introspection/reflection/__init__.py +0 -0
- tests/services/introspection/reflection/mock/__init__.py +0 -0
- tests/services/introspection/reflection/mock/fake_reflect_instance.py +0 -1115
- tests/services/introspection/reflection/test_reflection_abstract.py +0 -1011
- tests/services/introspection/reflection/test_reflection_callable.py +0 -206
- tests/services/introspection/reflection/test_reflection_concrete.py +0 -952
- tests/services/introspection/reflection/test_reflection_instance.py +0 -1233
- tests/services/introspection/reflection/test_reflection_module.py +0 -567
- tests/services/introspection/test_reflection.py +0 -462
- tests/services/log/__init__.py +0 -0
- tests/services/log/test_log.py +0 -97
- tests/services/system/__init__.py +0 -0
- tests/services/system/test_services_system_imports.py +0 -204
- tests/services/system/test_services_system_workers.py +0 -131
- tests/support/__init__.py +0 -0
- tests/support/entities/__init__.py +0 -0
- tests/support/entities/mock_dataclass.py +0 -40
- tests/support/entities/test_base.py +0 -64
- tests/support/patterns/__init__.py +0 -0
- tests/support/patterns/singleton/__init__.py +0 -0
- tests/support/patterns/singleton/test_patterns_singleton.py +0 -39
- tests/support/standard/__init__.py +0 -0
- tests/support/standard/test_services_std.py +0 -226
- tests/support/wrapper/__init__.py +0 -0
- tests/support/wrapper/test_services_wrapper_docdict.py +0 -202
- tests/testing/__init__.py +0 -0
- tests/testing/cases/__init__.py +0 -0
- tests/testing/cases/test_testing_asynchronous.py +0 -63
- tests/testing/cases/test_testing_synchronous.py +0 -57
- tests/testing/entities/__init__.py +0 -0
- tests/testing/entities/test_testing_result.py +0 -146
- tests/testing/enums/__init__.py +0 -0
- tests/testing/enums/test_testing_status.py +0 -63
- tests/testing/output/__init__.py +0 -0
- tests/testing/output/test_testing_dumper.py +0 -29
- tests/testing/output/test_testing_printer.py +0 -42
- tests/testing/records/__init__.py +0 -0
- tests/testing/records/test_testing_records.py +0 -171
- tests/testing/test_testing_unit.py +0 -164
- tests/testing/validators/__init__.py +0 -0
- tests/testing/validators/test_testing_validators.py +0 -392
- tests/testing/view/__init__.py +0 -0
- tests/testing/view/test_render.py +0 -30
- {orionis-0.546.0.dist-info → orionis-0.548.0.dist-info}/WHEEL +0 -0
- {orionis-0.546.0.dist-info → orionis-0.548.0.dist-info}/licenses/LICENCE +0 -0
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
from orionis.container.container import Container
|
|
2
|
-
from orionis.test.cases.asynchronous import AsyncTestCase
|
|
3
|
-
from tests.container.mocks.mock_async_optimizations import AsyncTestService, AsyncTestServiceWithDependency, IAsyncTestService, IAsyncTestServiceWithDependency, ITestService, ITestServiceWithDependency, MixedService, TestService, TestServiceWithDependency, async_callable, async_callable_with_dependency, sync_callable, sync_callable_with_dependency
|
|
4
|
-
|
|
5
|
-
class TestContainer(AsyncTestCase):
|
|
6
|
-
|
|
7
|
-
async def testSyncServices(self):
|
|
8
|
-
"""
|
|
9
|
-
Tests the registration and resolution of synchronous services in the container.
|
|
10
|
-
|
|
11
|
-
This method verifies that singleton and transient services can be registered and resolved correctly.
|
|
12
|
-
It checks that the singleton service returns the same instance on multiple resolutions, and that
|
|
13
|
-
the service with a dependency is properly constructed.
|
|
14
|
-
|
|
15
|
-
Returns
|
|
16
|
-
-------
|
|
17
|
-
None
|
|
18
|
-
This method does not return a value. Assertions are used to validate behavior.
|
|
19
|
-
"""
|
|
20
|
-
|
|
21
|
-
# Create a new container instance
|
|
22
|
-
container = Container()
|
|
23
|
-
|
|
24
|
-
# Register a singleton service and a transient service with dependency
|
|
25
|
-
container.singleton(ITestService, TestService)
|
|
26
|
-
container.transient(ITestServiceWithDependency, TestServiceWithDependency)
|
|
27
|
-
|
|
28
|
-
# Resolve the singleton service and verify its method output
|
|
29
|
-
service: ITestService = container.make(ITestService)
|
|
30
|
-
self.assertEqual(service.get_message(), "Hello from sync service")
|
|
31
|
-
|
|
32
|
-
# Resolve the transient service with dependency and check its output
|
|
33
|
-
service_with_dep: ITestServiceWithDependency = container.make(ITestServiceWithDependency)
|
|
34
|
-
self.assertTrue(service_with_dep.get_combined_message().startswith("Combined: "))
|
|
35
|
-
|
|
36
|
-
# Ensure that singleton returns the same instance on multiple resolutions
|
|
37
|
-
service2: ITestService = container.make(ITestService)
|
|
38
|
-
self.assertIs(service, service2, "Singleton service should return the same instance")
|
|
39
|
-
|
|
40
|
-
async def testAsyncServices(self):
|
|
41
|
-
"""
|
|
42
|
-
Tests the registration and resolution of asynchronous services in the dependency injection container.
|
|
43
|
-
|
|
44
|
-
This method ensures that asynchronous services can be registered as singletons or transients and resolved correctly.
|
|
45
|
-
It verifies that the resolved service instance matches the expected implementation type.
|
|
46
|
-
|
|
47
|
-
Parameters
|
|
48
|
-
----------
|
|
49
|
-
self : TestContainer
|
|
50
|
-
The test case instance.
|
|
51
|
-
|
|
52
|
-
Returns
|
|
53
|
-
-------
|
|
54
|
-
None
|
|
55
|
-
This method does not return a value. Assertions are used to validate correct behavior.
|
|
56
|
-
"""
|
|
57
|
-
|
|
58
|
-
# Create a new container instance
|
|
59
|
-
container = Container()
|
|
60
|
-
|
|
61
|
-
# Register an asynchronous singleton service
|
|
62
|
-
container.singleton(IAsyncTestService, AsyncTestService)
|
|
63
|
-
|
|
64
|
-
# Register an asynchronous transient service with dependency
|
|
65
|
-
container.transient(IAsyncTestServiceWithDependency, AsyncTestServiceWithDependency)
|
|
66
|
-
|
|
67
|
-
# Resolve the asynchronous singleton service and check its type
|
|
68
|
-
async_service = container.make(IAsyncTestService)
|
|
69
|
-
self.assertIsInstance(async_service, AsyncTestService)
|
|
70
|
-
|
|
71
|
-
async def testAsyncCalls(self):
|
|
72
|
-
"""
|
|
73
|
-
Tests asynchronous service resolution and asynchronous method invocation in the dependency injection container.
|
|
74
|
-
|
|
75
|
-
This method verifies that asynchronous services can be registered, resolved, and their asynchronous methods invoked correctly.
|
|
76
|
-
It checks both singleton and transient registrations, and asserts that the returned values are as expected.
|
|
77
|
-
|
|
78
|
-
Parameters
|
|
79
|
-
----------
|
|
80
|
-
self : TestContainer
|
|
81
|
-
The test case instance.
|
|
82
|
-
|
|
83
|
-
Returns
|
|
84
|
-
-------
|
|
85
|
-
None
|
|
86
|
-
This method does not return a value. Assertions are used to validate correct behavior.
|
|
87
|
-
"""
|
|
88
|
-
|
|
89
|
-
# Create a new container instance
|
|
90
|
-
container = Container()
|
|
91
|
-
|
|
92
|
-
# Register an asynchronous singleton service
|
|
93
|
-
container.singleton(IAsyncTestService, AsyncTestService)
|
|
94
|
-
|
|
95
|
-
# Register an asynchronous transient service with dependency
|
|
96
|
-
container.transient(IAsyncTestServiceWithDependency, AsyncTestServiceWithDependency)
|
|
97
|
-
|
|
98
|
-
# Resolve the asynchronous singleton service
|
|
99
|
-
async_service: IAsyncTestService = container.make(IAsyncTestService)
|
|
100
|
-
|
|
101
|
-
# Call an asynchronous method on the resolved service and check the result
|
|
102
|
-
result = await container.callAsync(async_service, 'get_async_message')
|
|
103
|
-
self.assertEqual(result, "Hello from async service")
|
|
104
|
-
|
|
105
|
-
# Resolve the asynchronous transient service with dependency
|
|
106
|
-
service_with_dep: IAsyncTestServiceWithDependency = container.make(IAsyncTestServiceWithDependency)
|
|
107
|
-
|
|
108
|
-
# Call an asynchronous method that combines results from dependencies and check the result
|
|
109
|
-
result2: str = await container.callAsync(service_with_dep, 'get_combined_async_message')
|
|
110
|
-
self.assertTrue(result2.startswith("Combined: "))
|
|
111
|
-
|
|
112
|
-
async def testCallableRegistration(self):
|
|
113
|
-
"""
|
|
114
|
-
Tests the registration and resolution of synchronous and asynchronous callables in the dependency injection container.
|
|
115
|
-
|
|
116
|
-
This method verifies that:
|
|
117
|
-
- Synchronous services can be registered as singletons.
|
|
118
|
-
- Synchronous callables can be registered and resolved by name.
|
|
119
|
-
- Callables with dependencies are correctly resolved and invoked.
|
|
120
|
-
- The resolved callables return the expected results.
|
|
121
|
-
|
|
122
|
-
Parameters
|
|
123
|
-
----------
|
|
124
|
-
self : TestContainer
|
|
125
|
-
The test case instance.
|
|
126
|
-
|
|
127
|
-
Returns
|
|
128
|
-
-------
|
|
129
|
-
None
|
|
130
|
-
This method does not return a value. Assertions are used to validate correct behavior.
|
|
131
|
-
"""
|
|
132
|
-
|
|
133
|
-
# Create a new container instance
|
|
134
|
-
container = Container()
|
|
135
|
-
|
|
136
|
-
# Register base services as singletons
|
|
137
|
-
container.singleton(ITestService, TestService)
|
|
138
|
-
container.singleton(IAsyncTestService, AsyncTestService)
|
|
139
|
-
|
|
140
|
-
# Register synchronous callables, including one with a dependency
|
|
141
|
-
container.callable("sync_func", sync_callable)
|
|
142
|
-
container.callable("sync_func_with_dep", sync_callable_with_dependency)
|
|
143
|
-
|
|
144
|
-
# Resolve and invoke the synchronous callable, then check its result
|
|
145
|
-
result1: str = container.make("sync_func")
|
|
146
|
-
self.assertEqual(result1, "Sync callable result")
|
|
147
|
-
|
|
148
|
-
# Resolve and invoke the callable with dependency, then check its result
|
|
149
|
-
result2: str = container.make("sync_func_with_dep")
|
|
150
|
-
self.assertTrue(result2.startswith("Callable with dependency: "))
|
|
151
|
-
|
|
152
|
-
async def testAsyncCallables(self):
|
|
153
|
-
"""
|
|
154
|
-
Tests registration, resolution, and invocation of asynchronous callables in the dependency injection container.
|
|
155
|
-
|
|
156
|
-
This method ensures that:
|
|
157
|
-
- Asynchronous callables can be registered using the `callable` method.
|
|
158
|
-
- Registered asynchronous callables are resolved correctly from the container.
|
|
159
|
-
- Dependencies for asynchronous callables are properly injected by the container.
|
|
160
|
-
- The results returned by the asynchronous callables match the expected output.
|
|
161
|
-
|
|
162
|
-
Parameters
|
|
163
|
-
----------
|
|
164
|
-
self : TestContainer
|
|
165
|
-
The test case instance.
|
|
166
|
-
|
|
167
|
-
Returns
|
|
168
|
-
-------
|
|
169
|
-
None
|
|
170
|
-
This method does not return a value. Assertions are used to validate correct behavior.
|
|
171
|
-
"""
|
|
172
|
-
|
|
173
|
-
# Create a new container instance
|
|
174
|
-
container = Container()
|
|
175
|
-
|
|
176
|
-
# Register base services as singletons for dependency injection
|
|
177
|
-
container.singleton(ITestService, TestService)
|
|
178
|
-
container.singleton(IAsyncTestService, AsyncTestService)
|
|
179
|
-
|
|
180
|
-
# Register asynchronous callables, including one with a dependency
|
|
181
|
-
container.callable("async_func", async_callable)
|
|
182
|
-
container.callable("async_func_with_dep", async_callable_with_dependency)
|
|
183
|
-
|
|
184
|
-
# Resolve and invoke the asynchronous callable, then check its result
|
|
185
|
-
result1: str = container.make("async_func")
|
|
186
|
-
self.assertEqual(result1, "Async callable result")
|
|
187
|
-
|
|
188
|
-
# Resolve and invoke the asynchronous callable with dependency, then check its result
|
|
189
|
-
result2: str = container.make("async_func_with_dep")
|
|
190
|
-
self.assertTrue(result2.startswith("Async callable with dependency: "))
|
|
191
|
-
|
|
192
|
-
async def testMixedSyncAsync(self):
|
|
193
|
-
"""
|
|
194
|
-
Tests the container's ability to integrate synchronous and asynchronous services and dependencies.
|
|
195
|
-
|
|
196
|
-
This method registers both a synchronous service (`TestService`) and an asynchronous service (`AsyncTestService`)
|
|
197
|
-
as singletons in the container. It then resolves a `MixedService` instance, which depends on both types of services,
|
|
198
|
-
and invokes its synchronous method `get_sync_message` using the container's `call` method. The test asserts that
|
|
199
|
-
the returned message from the synchronous method starts with "Mixed sync: ", verifying that the container can
|
|
200
|
-
correctly handle and inject both synchronous and asynchronous dependencies into a mixed service.
|
|
201
|
-
|
|
202
|
-
Parameters
|
|
203
|
-
----------
|
|
204
|
-
self : TestContainer
|
|
205
|
-
The test case instance.
|
|
206
|
-
|
|
207
|
-
Returns
|
|
208
|
-
-------
|
|
209
|
-
None
|
|
210
|
-
This method does not return a value. Assertions are used to validate correct behavior.
|
|
211
|
-
"""
|
|
212
|
-
|
|
213
|
-
# Create a new container instance
|
|
214
|
-
container = Container()
|
|
215
|
-
|
|
216
|
-
# Register synchronous and asynchronous services as singletons
|
|
217
|
-
container.singleton(ITestService, TestService)
|
|
218
|
-
container.singleton(IAsyncTestService, AsyncTestService)
|
|
219
|
-
|
|
220
|
-
# Resolve the mixed service, which depends on both sync and async services
|
|
221
|
-
mixed_service = container.make(MixedService)
|
|
222
|
-
|
|
223
|
-
# Invoke the synchronous method and check the result
|
|
224
|
-
sync_result: str = container.call(mixed_service, 'get_sync_message')
|
|
225
|
-
self.assertTrue(sync_result.startswith("Mixed sync: "))
|
|
226
|
-
|
|
227
|
-
async def testMixedAsync(self):
|
|
228
|
-
"""
|
|
229
|
-
Tests the container's ability to integrate synchronous and asynchronous services and dependencies,
|
|
230
|
-
focusing on asynchronous method invocation.
|
|
231
|
-
|
|
232
|
-
This method performs the following verifications:
|
|
233
|
-
- Registers both a synchronous service (`TestService`) and an asynchronous service (`AsyncTestService`)
|
|
234
|
-
as singletons in the container.
|
|
235
|
-
- Resolves a `MixedService` instance, which depends on both types of services.
|
|
236
|
-
- Invokes the asynchronous method `get_async_message` on the mixed service using `callAsync` and asserts
|
|
237
|
-
that the returned message starts with "Mixed async: ".
|
|
238
|
-
- Invokes the asynchronous method `get_both_messages` on the mixed service using `callAsync` and asserts
|
|
239
|
-
that the returned message starts with "Both: ".
|
|
240
|
-
|
|
241
|
-
Parameters
|
|
242
|
-
----------
|
|
243
|
-
self : TestContainer
|
|
244
|
-
The test case instance.
|
|
245
|
-
|
|
246
|
-
Returns
|
|
247
|
-
-------
|
|
248
|
-
None
|
|
249
|
-
This method does not return a value. Assertions are used to validate correct behavior.
|
|
250
|
-
"""
|
|
251
|
-
|
|
252
|
-
# Create a new container instance
|
|
253
|
-
container = Container()
|
|
254
|
-
|
|
255
|
-
# Register synchronous and asynchronous services as singletons
|
|
256
|
-
container.singleton(ITestService, TestService)
|
|
257
|
-
container.singleton(IAsyncTestService, AsyncTestService)
|
|
258
|
-
|
|
259
|
-
# Resolve the mixed service, which depends on both sync and async services
|
|
260
|
-
mixed_service = container.make(MixedService)
|
|
261
|
-
|
|
262
|
-
# Invoke the asynchronous method and check the result
|
|
263
|
-
async_result: str = await container.callAsync(mixed_service, 'get_async_message')
|
|
264
|
-
self.assertTrue(async_result.startswith("Mixed async: "))
|
|
265
|
-
|
|
266
|
-
# Invoke the asynchronous method that combines both sync and async dependencies and check the result
|
|
267
|
-
both_result = await container.callAsync(mixed_service, 'get_both_messages')
|
|
268
|
-
self.assertTrue(both_result.startswith("Both: "))
|