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.
Files changed (160) hide show
  1. orionis/console/base/scheduler_event_listener.py +0 -17
  2. orionis/console/contracts/schedule_event_listener.py +0 -18
  3. orionis/foundation/config/app/entities/app.py +3 -2
  4. orionis/foundation/config/app/enums/ciphers.py +5 -19
  5. orionis/foundation/config/session/entities/session.py +2 -2
  6. orionis/metadata/framework.py +1 -1
  7. orionis/services/encrypter/encrypter.py +115 -0
  8. orionis/services/environment/dynamic/caster.py +35 -27
  9. orionis/services/environment/key/key_generator.py +32 -11
  10. {orionis-0.546.0.dist-info → orionis-0.548.0.dist-info}/METADATA +1 -1
  11. {orionis-0.546.0.dist-info → orionis-0.548.0.dist-info}/RECORD +14 -159
  12. {orionis-0.546.0.dist-info → orionis-0.548.0.dist-info}/top_level.txt +0 -1
  13. orionis-0.546.0.dist-info/zip-safe +0 -1
  14. tests/container/__init__.py +0 -0
  15. tests/container/context/__init__.py +0 -0
  16. tests/container/context/test_manager.py +0 -38
  17. tests/container/context/test_scope.py +0 -32
  18. tests/container/core/__init__.py +0 -0
  19. tests/container/core/test_advanced_async.py +0 -234
  20. tests/container/core/test_async_optimizations.py +0 -268
  21. tests/container/core/test_container.py +0 -453
  22. tests/container/core/test_singleton.py +0 -122
  23. tests/container/core/test_thread_safety.py +0 -90
  24. tests/container/entities/__init__.py +0 -0
  25. tests/container/entities/test_binding.py +0 -242
  26. tests/container/enums/__init__.py +0 -0
  27. tests/container/enums/test_lifetimes.py +0 -97
  28. tests/container/facades/__init__.py +0 -0
  29. tests/container/facades/test_facade.py +0 -78
  30. tests/container/mocks/__init__.py +0 -0
  31. tests/container/mocks/mock_advanced_async.py +0 -332
  32. tests/container/mocks/mock_async_optimizations.py +0 -407
  33. tests/container/mocks/mock_auto_resolution.py +0 -192
  34. tests/container/mocks/mock_complex_classes.py +0 -792
  35. tests/container/mocks/mock_simple_classes.py +0 -98
  36. tests/container/providers/__init__.py +0 -0
  37. tests/container/providers/test_providers.py +0 -55
  38. tests/container/validators/__init__.py +0 -0
  39. tests/container/validators/test_implements.py +0 -186
  40. tests/container/validators/test_is_abstract_class.py +0 -147
  41. tests/container/validators/test_is_callable.py +0 -102
  42. tests/container/validators/test_is_concrete_class.py +0 -160
  43. tests/container/validators/test_is_instance.py +0 -150
  44. tests/container/validators/test_is_not_subclass.py +0 -49
  45. tests/container/validators/test_is_subclass.py +0 -178
  46. tests/container/validators/test_is_valid_alias.py +0 -147
  47. tests/container/validators/test_lifetime.py +0 -106
  48. tests/example/__init__.py +0 -0
  49. tests/example/test_example.py +0 -725
  50. tests/foundation/__init__.py +0 -0
  51. tests/foundation/config/__init__.py +0 -0
  52. tests/foundation/config/app/__init__.py +0 -0
  53. tests/foundation/config/app/test_foundation_config_app.py +0 -262
  54. tests/foundation/config/auth/__init__.py +0 -0
  55. tests/foundation/config/auth/test_foundation_config_auth.py +0 -29
  56. tests/foundation/config/cache/__init__.py +0 -0
  57. tests/foundation/config/cache/test_foundation_config_cache.py +0 -143
  58. tests/foundation/config/cache/test_foundation_config_cache_file.py +0 -126
  59. tests/foundation/config/cache/test_foundation_config_cache_stores.py +0 -156
  60. tests/foundation/config/cors/__init__.py +0 -0
  61. tests/foundation/config/cors/test_foundation_config_cors.py +0 -190
  62. tests/foundation/config/database/__init__.py +0 -0
  63. tests/foundation/config/database/test_foundation_config_database.py +0 -158
  64. tests/foundation/config/database/test_foundation_config_database_connections.py +0 -203
  65. tests/foundation/config/database/test_foundation_config_database_mysql.py +0 -354
  66. tests/foundation/config/database/test_foundation_config_database_oracle.py +0 -288
  67. tests/foundation/config/database/test_foundation_config_database_pgsql.py +0 -257
  68. tests/foundation/config/database/test_foundation_config_database_sqlite.py +0 -207
  69. tests/foundation/config/filesystems/__init__.py +0 -0
  70. tests/foundation/config/filesystems/test_foundation_config_filesystems.py +0 -160
  71. tests/foundation/config/filesystems/test_foundation_config_filesystems_aws.py +0 -189
  72. tests/foundation/config/filesystems/test_foundation_config_filesystems_disks.py +0 -184
  73. tests/foundation/config/filesystems/test_foundation_config_filesystems_local.py +0 -143
  74. tests/foundation/config/filesystems/test_foundation_config_filesystems_public.py +0 -184
  75. tests/foundation/config/logging/__init__.py +0 -0
  76. tests/foundation/config/logging/test_foundation_config_logging.py +0 -112
  77. tests/foundation/config/logging/test_foundation_config_logging_channels.py +0 -246
  78. tests/foundation/config/logging/test_foundation_config_logging_chunked.py +0 -217
  79. tests/foundation/config/logging/test_foundation_config_logging_daily.py +0 -220
  80. tests/foundation/config/logging/test_foundation_config_logging_hourly.py +0 -196
  81. tests/foundation/config/logging/test_foundation_config_logging_monthly.py +0 -214
  82. tests/foundation/config/logging/test_foundation_config_logging_stack.py +0 -178
  83. tests/foundation/config/logging/test_foundation_config_logging_weekly.py +0 -224
  84. tests/foundation/config/mail/__init__.py +0 -0
  85. tests/foundation/config/mail/test_foundation_config_mail.py +0 -145
  86. tests/foundation/config/mail/test_foundation_config_mail_file.py +0 -97
  87. tests/foundation/config/mail/test_foundation_config_mail_mailers.py +0 -106
  88. tests/foundation/config/mail/test_foundation_config_mail_smtp.py +0 -146
  89. tests/foundation/config/queue/__init__.py +0 -0
  90. tests/foundation/config/queue/test_foundation_config_queue.py +0 -88
  91. tests/foundation/config/queue/test_foundation_config_queue_brokers.py +0 -72
  92. tests/foundation/config/queue/test_foundation_config_queue_database.py +0 -134
  93. tests/foundation/config/root/__init__.py +0 -0
  94. tests/foundation/config/root/test_foundation_config_root_paths.py +0 -112
  95. tests/foundation/config/session/__init__.py +0 -0
  96. tests/foundation/config/session/test_foundation_config_session.py +0 -213
  97. tests/foundation/config/startup/__init__.py +0 -0
  98. tests/foundation/config/startup/test_foundation_config_startup.py +0 -202
  99. tests/foundation/config/testing/__init__.py +0 -0
  100. tests/foundation/config/testing/test_foundation_config_testing.py +0 -235
  101. tests/metadata/__init__.py +0 -0
  102. tests/metadata/test_metadata_framework.py +0 -140
  103. tests/metadata/test_metadata_package.py +0 -139
  104. tests/services/__init__.py +0 -0
  105. tests/services/asynchrony/__init__.py +0 -0
  106. tests/services/asynchrony/test_services_asynchrony_coroutine.py +0 -85
  107. tests/services/environment/__init__.py +0 -0
  108. tests/services/environment/test_services_environment.py +0 -226
  109. tests/services/introspection/__init__.py +0 -0
  110. tests/services/introspection/dependencies/__init__.py +0 -0
  111. tests/services/introspection/dependencies/mocks/__init__.py +0 -0
  112. tests/services/introspection/dependencies/mocks/mock_user.py +0 -30
  113. tests/services/introspection/dependencies/mocks/mock_user_controller.py +0 -27
  114. tests/services/introspection/dependencies/mocks/mock_users_permissions.py +0 -41
  115. tests/services/introspection/dependencies/test_reflect_dependencies.py +0 -261
  116. tests/services/introspection/reflection/__init__.py +0 -0
  117. tests/services/introspection/reflection/mock/__init__.py +0 -0
  118. tests/services/introspection/reflection/mock/fake_reflect_instance.py +0 -1115
  119. tests/services/introspection/reflection/test_reflection_abstract.py +0 -1011
  120. tests/services/introspection/reflection/test_reflection_callable.py +0 -206
  121. tests/services/introspection/reflection/test_reflection_concrete.py +0 -952
  122. tests/services/introspection/reflection/test_reflection_instance.py +0 -1233
  123. tests/services/introspection/reflection/test_reflection_module.py +0 -567
  124. tests/services/introspection/test_reflection.py +0 -462
  125. tests/services/log/__init__.py +0 -0
  126. tests/services/log/test_log.py +0 -97
  127. tests/services/system/__init__.py +0 -0
  128. tests/services/system/test_services_system_imports.py +0 -204
  129. tests/services/system/test_services_system_workers.py +0 -131
  130. tests/support/__init__.py +0 -0
  131. tests/support/entities/__init__.py +0 -0
  132. tests/support/entities/mock_dataclass.py +0 -40
  133. tests/support/entities/test_base.py +0 -64
  134. tests/support/patterns/__init__.py +0 -0
  135. tests/support/patterns/singleton/__init__.py +0 -0
  136. tests/support/patterns/singleton/test_patterns_singleton.py +0 -39
  137. tests/support/standard/__init__.py +0 -0
  138. tests/support/standard/test_services_std.py +0 -226
  139. tests/support/wrapper/__init__.py +0 -0
  140. tests/support/wrapper/test_services_wrapper_docdict.py +0 -202
  141. tests/testing/__init__.py +0 -0
  142. tests/testing/cases/__init__.py +0 -0
  143. tests/testing/cases/test_testing_asynchronous.py +0 -63
  144. tests/testing/cases/test_testing_synchronous.py +0 -57
  145. tests/testing/entities/__init__.py +0 -0
  146. tests/testing/entities/test_testing_result.py +0 -146
  147. tests/testing/enums/__init__.py +0 -0
  148. tests/testing/enums/test_testing_status.py +0 -63
  149. tests/testing/output/__init__.py +0 -0
  150. tests/testing/output/test_testing_dumper.py +0 -29
  151. tests/testing/output/test_testing_printer.py +0 -42
  152. tests/testing/records/__init__.py +0 -0
  153. tests/testing/records/test_testing_records.py +0 -171
  154. tests/testing/test_testing_unit.py +0 -164
  155. tests/testing/validators/__init__.py +0 -0
  156. tests/testing/validators/test_testing_validators.py +0 -392
  157. tests/testing/view/__init__.py +0 -0
  158. tests/testing/view/test_render.py +0 -30
  159. {orionis-0.546.0.dist-info → orionis-0.548.0.dist-info}/WHEEL +0 -0
  160. {orionis-0.546.0.dist-info → orionis-0.548.0.dist-info}/licenses/LICENCE +0 -0
@@ -1,206 +0,0 @@
1
- from orionis.services.introspection.callables.reflection import ReflectionCallable
2
- from orionis.services.introspection.dependencies.entities.resolve_argument import ResolveArguments
3
- from orionis.test.cases.asynchronous import AsyncTestCase
4
- from orionis.services.introspection.exceptions import ReflectionTypeError
5
-
6
- class TestReflectionCallable(AsyncTestCase):
7
-
8
- async def testInitValidFunction(self):
9
- """
10
- Test initialization of ReflectionCallable with a valid function.
11
-
12
- Validates that a ReflectionCallable instance can be created with a standard function
13
- and that the stored callable matches the original function.
14
-
15
- Returns
16
- -------
17
- None
18
- """
19
- def sample_function(a, b=2):
20
- """Sample docstring."""
21
- return a + b
22
- rc = ReflectionCallable(sample_function)
23
- self.assertEqual(rc.getCallable(), sample_function)
24
-
25
- async def testInitInvalid(self):
26
- """
27
- Test initialization of ReflectionCallable with an invalid argument.
28
-
29
- Ensures that passing a non-callable object (e.g., an integer) to ReflectionCallable
30
- raises a ReflectionTypeError.
31
-
32
- Returns
33
- -------
34
- None
35
- """
36
- with self.assertRaises(ReflectionTypeError):
37
- ReflectionCallable(123)
38
-
39
- async def testGetName(self):
40
- """
41
- Test retrieval of the function name from ReflectionCallable.
42
-
43
- Checks that the getName() method returns the correct name of the wrapped function.
44
-
45
- Returns
46
- -------
47
- None
48
- """
49
- def sample_function(a, b=2):
50
- """Sample docstring."""
51
- return a + b
52
- rc = ReflectionCallable(sample_function)
53
- self.assertEqual(rc.getName(), "sample_function")
54
-
55
- async def testGetModuleName(self):
56
- """
57
- Test retrieval of the module name from ReflectionCallable.
58
-
59
- Verifies that getModuleName() returns the module name where the function is defined.
60
-
61
- Returns
62
- -------
63
- None
64
- """
65
- def sample_function(a, b=2):
66
- """Sample docstring."""
67
- return a + b
68
- rc = ReflectionCallable(sample_function)
69
- self.assertEqual(rc.getModuleName(), sample_function.__module__)
70
-
71
- async def testGetModuleWithCallableName(self):
72
- """
73
- Test retrieval of the fully qualified name from ReflectionCallable.
74
-
75
- Ensures that getModuleWithCallableName() returns the module and function name
76
- in the format "<module>.<function_name>".
77
-
78
- Returns
79
- -------
80
- None
81
- """
82
- def sample_function(a, b=2):
83
- """Sample docstring."""
84
- return a + b
85
- rc = ReflectionCallable(sample_function)
86
- expected = f"{sample_function.__module__}.sample_function"
87
- self.assertEqual(rc.getModuleWithCallableName(), expected)
88
-
89
- async def testGetDocstring(self):
90
- """
91
- Test retrieval of the docstring from ReflectionCallable.
92
-
93
- Confirms that getDocstring() returns the docstring of the wrapped function.
94
-
95
- Returns
96
- -------
97
- None
98
- """
99
- def sample_function(a, b=2):
100
- """Sample docstring."""
101
- return a + b
102
- rc = ReflectionCallable(sample_function)
103
- self.assertIn("Sample docstring", rc.getDocstring())
104
-
105
- async def testGetSourceCode(self):
106
- """
107
- Test retrieval of source code from ReflectionCallable.
108
-
109
- Checks that getSourceCode() returns the source code of the wrapped function,
110
- and that the code contains the function definition.
111
-
112
- Returns
113
- -------
114
- None
115
- """
116
- def sample_function(a, b=2):
117
- """Sample docstring."""
118
- return a + b
119
- rc = ReflectionCallable(sample_function)
120
- code = rc.getSourceCode()
121
- self.assertIn("def sample_function", code)
122
-
123
- async def testGetSourceCodeError(self):
124
- """
125
- Test error handling when retrieving source code from a built-in function.
126
-
127
- Ensures that getSourceCode() raises a ReflectionTypeError when called on a
128
- built-in function (e.g., len) that lacks accessible source code.
129
-
130
- Returns
131
- -------
132
- None
133
- """
134
- with self.assertRaises(ReflectionTypeError):
135
- rc = ReflectionCallable(len)
136
- rc.getSourceCode()
137
-
138
- async def testGetFile(self):
139
- """
140
- Test retrieval of the file path from ReflectionCallable.
141
-
142
- Verifies that getFile() returns the file path of the wrapped function and that
143
- the path ends with '.py', indicating a Python source file.
144
-
145
- Returns
146
- -------
147
- None
148
- """
149
- def sample_function(a, b=2):
150
- """Sample docstring."""
151
- return a + b
152
- rc = ReflectionCallable(sample_function)
153
- file_path = rc.getFile()
154
- self.assertTrue(file_path.endswith(".py"))
155
-
156
- async def testCallSync(self):
157
- """
158
- Test synchronous invocation of the wrapped function using ReflectionCallable.
159
-
160
- Validates that calling the wrapped function with arguments returns the expected result.
161
-
162
- Returns
163
- -------
164
- None
165
- """
166
- def sample_function(a, b=2):
167
- """Sample docstring."""
168
- return a + b
169
- rc = ReflectionCallable(sample_function)
170
- self.assertEqual(rc.call(1, 2), 3)
171
-
172
- async def testCallAsync(self):
173
- """
174
- Test asynchronous invocation of an async function using ReflectionCallable.
175
-
176
- Ensures that an asynchronous function can be called and awaited, returning the correct result.
177
-
178
- Returns
179
- -------
180
- None
181
- """
182
- async def sample_async_function(a, b=2):
183
- """Async docstring."""
184
- return a + b
185
- rc = ReflectionCallable(sample_async_function)
186
- self.assertEqual(await rc.call(1, 2), 3)
187
-
188
- async def testGetDependencies(self):
189
- """
190
- Test retrieval of callable dependencies from ReflectionCallable.
191
-
192
- Checks that getDependencies() returns a ResolveArguments object with
193
- 'resolved' and 'unresolved' attributes for the wrapped function.
194
-
195
- Returns
196
- -------
197
- None
198
- """
199
- def sample_function(a, b=2):
200
- """Sample docstring."""
201
- return a + b
202
- rc = ReflectionCallable(sample_function)
203
- deps = rc.getDependencies()
204
- self.assertIsInstance(deps, ResolveArguments)
205
- self.assertTrue(hasattr(deps, "resolved"))
206
- self.assertTrue(hasattr(deps, "unresolved"))