orionis 0.546.0__py3-none-any.whl → 0.547.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.547.0.dist-info}/METADATA +1 -1
  11. {orionis-0.546.0.dist-info → orionis-0.547.0.dist-info}/RECORD +15 -159
  12. {orionis-0.546.0.dist-info → orionis-0.547.0.dist-info}/top_level.txt +0 -1
  13. tests/container/__init__.py +0 -0
  14. tests/container/context/__init__.py +0 -0
  15. tests/container/context/test_manager.py +0 -38
  16. tests/container/context/test_scope.py +0 -32
  17. tests/container/core/__init__.py +0 -0
  18. tests/container/core/test_advanced_async.py +0 -234
  19. tests/container/core/test_async_optimizations.py +0 -268
  20. tests/container/core/test_container.py +0 -453
  21. tests/container/core/test_singleton.py +0 -122
  22. tests/container/core/test_thread_safety.py +0 -90
  23. tests/container/entities/__init__.py +0 -0
  24. tests/container/entities/test_binding.py +0 -242
  25. tests/container/enums/__init__.py +0 -0
  26. tests/container/enums/test_lifetimes.py +0 -97
  27. tests/container/facades/__init__.py +0 -0
  28. tests/container/facades/test_facade.py +0 -78
  29. tests/container/mocks/__init__.py +0 -0
  30. tests/container/mocks/mock_advanced_async.py +0 -332
  31. tests/container/mocks/mock_async_optimizations.py +0 -407
  32. tests/container/mocks/mock_auto_resolution.py +0 -192
  33. tests/container/mocks/mock_complex_classes.py +0 -792
  34. tests/container/mocks/mock_simple_classes.py +0 -98
  35. tests/container/providers/__init__.py +0 -0
  36. tests/container/providers/test_providers.py +0 -55
  37. tests/container/validators/__init__.py +0 -0
  38. tests/container/validators/test_implements.py +0 -186
  39. tests/container/validators/test_is_abstract_class.py +0 -147
  40. tests/container/validators/test_is_callable.py +0 -102
  41. tests/container/validators/test_is_concrete_class.py +0 -160
  42. tests/container/validators/test_is_instance.py +0 -150
  43. tests/container/validators/test_is_not_subclass.py +0 -49
  44. tests/container/validators/test_is_subclass.py +0 -178
  45. tests/container/validators/test_is_valid_alias.py +0 -147
  46. tests/container/validators/test_lifetime.py +0 -106
  47. tests/example/__init__.py +0 -0
  48. tests/example/test_example.py +0 -725
  49. tests/foundation/__init__.py +0 -0
  50. tests/foundation/config/__init__.py +0 -0
  51. tests/foundation/config/app/__init__.py +0 -0
  52. tests/foundation/config/app/test_foundation_config_app.py +0 -262
  53. tests/foundation/config/auth/__init__.py +0 -0
  54. tests/foundation/config/auth/test_foundation_config_auth.py +0 -29
  55. tests/foundation/config/cache/__init__.py +0 -0
  56. tests/foundation/config/cache/test_foundation_config_cache.py +0 -143
  57. tests/foundation/config/cache/test_foundation_config_cache_file.py +0 -126
  58. tests/foundation/config/cache/test_foundation_config_cache_stores.py +0 -156
  59. tests/foundation/config/cors/__init__.py +0 -0
  60. tests/foundation/config/cors/test_foundation_config_cors.py +0 -190
  61. tests/foundation/config/database/__init__.py +0 -0
  62. tests/foundation/config/database/test_foundation_config_database.py +0 -158
  63. tests/foundation/config/database/test_foundation_config_database_connections.py +0 -203
  64. tests/foundation/config/database/test_foundation_config_database_mysql.py +0 -354
  65. tests/foundation/config/database/test_foundation_config_database_oracle.py +0 -288
  66. tests/foundation/config/database/test_foundation_config_database_pgsql.py +0 -257
  67. tests/foundation/config/database/test_foundation_config_database_sqlite.py +0 -207
  68. tests/foundation/config/filesystems/__init__.py +0 -0
  69. tests/foundation/config/filesystems/test_foundation_config_filesystems.py +0 -160
  70. tests/foundation/config/filesystems/test_foundation_config_filesystems_aws.py +0 -189
  71. tests/foundation/config/filesystems/test_foundation_config_filesystems_disks.py +0 -184
  72. tests/foundation/config/filesystems/test_foundation_config_filesystems_local.py +0 -143
  73. tests/foundation/config/filesystems/test_foundation_config_filesystems_public.py +0 -184
  74. tests/foundation/config/logging/__init__.py +0 -0
  75. tests/foundation/config/logging/test_foundation_config_logging.py +0 -112
  76. tests/foundation/config/logging/test_foundation_config_logging_channels.py +0 -246
  77. tests/foundation/config/logging/test_foundation_config_logging_chunked.py +0 -217
  78. tests/foundation/config/logging/test_foundation_config_logging_daily.py +0 -220
  79. tests/foundation/config/logging/test_foundation_config_logging_hourly.py +0 -196
  80. tests/foundation/config/logging/test_foundation_config_logging_monthly.py +0 -214
  81. tests/foundation/config/logging/test_foundation_config_logging_stack.py +0 -178
  82. tests/foundation/config/logging/test_foundation_config_logging_weekly.py +0 -224
  83. tests/foundation/config/mail/__init__.py +0 -0
  84. tests/foundation/config/mail/test_foundation_config_mail.py +0 -145
  85. tests/foundation/config/mail/test_foundation_config_mail_file.py +0 -97
  86. tests/foundation/config/mail/test_foundation_config_mail_mailers.py +0 -106
  87. tests/foundation/config/mail/test_foundation_config_mail_smtp.py +0 -146
  88. tests/foundation/config/queue/__init__.py +0 -0
  89. tests/foundation/config/queue/test_foundation_config_queue.py +0 -88
  90. tests/foundation/config/queue/test_foundation_config_queue_brokers.py +0 -72
  91. tests/foundation/config/queue/test_foundation_config_queue_database.py +0 -134
  92. tests/foundation/config/root/__init__.py +0 -0
  93. tests/foundation/config/root/test_foundation_config_root_paths.py +0 -112
  94. tests/foundation/config/session/__init__.py +0 -0
  95. tests/foundation/config/session/test_foundation_config_session.py +0 -213
  96. tests/foundation/config/startup/__init__.py +0 -0
  97. tests/foundation/config/startup/test_foundation_config_startup.py +0 -202
  98. tests/foundation/config/testing/__init__.py +0 -0
  99. tests/foundation/config/testing/test_foundation_config_testing.py +0 -235
  100. tests/metadata/__init__.py +0 -0
  101. tests/metadata/test_metadata_framework.py +0 -140
  102. tests/metadata/test_metadata_package.py +0 -139
  103. tests/services/__init__.py +0 -0
  104. tests/services/asynchrony/__init__.py +0 -0
  105. tests/services/asynchrony/test_services_asynchrony_coroutine.py +0 -85
  106. tests/services/environment/__init__.py +0 -0
  107. tests/services/environment/test_services_environment.py +0 -226
  108. tests/services/introspection/__init__.py +0 -0
  109. tests/services/introspection/dependencies/__init__.py +0 -0
  110. tests/services/introspection/dependencies/mocks/__init__.py +0 -0
  111. tests/services/introspection/dependencies/mocks/mock_user.py +0 -30
  112. tests/services/introspection/dependencies/mocks/mock_user_controller.py +0 -27
  113. tests/services/introspection/dependencies/mocks/mock_users_permissions.py +0 -41
  114. tests/services/introspection/dependencies/test_reflect_dependencies.py +0 -261
  115. tests/services/introspection/reflection/__init__.py +0 -0
  116. tests/services/introspection/reflection/mock/__init__.py +0 -0
  117. tests/services/introspection/reflection/mock/fake_reflect_instance.py +0 -1115
  118. tests/services/introspection/reflection/test_reflection_abstract.py +0 -1011
  119. tests/services/introspection/reflection/test_reflection_callable.py +0 -206
  120. tests/services/introspection/reflection/test_reflection_concrete.py +0 -952
  121. tests/services/introspection/reflection/test_reflection_instance.py +0 -1233
  122. tests/services/introspection/reflection/test_reflection_module.py +0 -567
  123. tests/services/introspection/test_reflection.py +0 -462
  124. tests/services/log/__init__.py +0 -0
  125. tests/services/log/test_log.py +0 -97
  126. tests/services/system/__init__.py +0 -0
  127. tests/services/system/test_services_system_imports.py +0 -204
  128. tests/services/system/test_services_system_workers.py +0 -131
  129. tests/support/__init__.py +0 -0
  130. tests/support/entities/__init__.py +0 -0
  131. tests/support/entities/mock_dataclass.py +0 -40
  132. tests/support/entities/test_base.py +0 -64
  133. tests/support/patterns/__init__.py +0 -0
  134. tests/support/patterns/singleton/__init__.py +0 -0
  135. tests/support/patterns/singleton/test_patterns_singleton.py +0 -39
  136. tests/support/standard/__init__.py +0 -0
  137. tests/support/standard/test_services_std.py +0 -226
  138. tests/support/wrapper/__init__.py +0 -0
  139. tests/support/wrapper/test_services_wrapper_docdict.py +0 -202
  140. tests/testing/__init__.py +0 -0
  141. tests/testing/cases/__init__.py +0 -0
  142. tests/testing/cases/test_testing_asynchronous.py +0 -63
  143. tests/testing/cases/test_testing_synchronous.py +0 -57
  144. tests/testing/entities/__init__.py +0 -0
  145. tests/testing/entities/test_testing_result.py +0 -146
  146. tests/testing/enums/__init__.py +0 -0
  147. tests/testing/enums/test_testing_status.py +0 -63
  148. tests/testing/output/__init__.py +0 -0
  149. tests/testing/output/test_testing_dumper.py +0 -29
  150. tests/testing/output/test_testing_printer.py +0 -42
  151. tests/testing/records/__init__.py +0 -0
  152. tests/testing/records/test_testing_records.py +0 -171
  153. tests/testing/test_testing_unit.py +0 -164
  154. tests/testing/validators/__init__.py +0 -0
  155. tests/testing/validators/test_testing_validators.py +0 -392
  156. tests/testing/view/__init__.py +0 -0
  157. tests/testing/view/test_render.py +0 -30
  158. {orionis-0.546.0.dist-info → orionis-0.547.0.dist-info}/WHEEL +0 -0
  159. {orionis-0.546.0.dist-info → orionis-0.547.0.dist-info}/licenses/LICENCE +0 -0
  160. {orionis-0.546.0.dist-info → orionis-0.547.0.dist-info}/zip-safe +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"))