orionis 0.545.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 (162) hide show
  1. orionis/console/base/scheduler_event_listener.py +0 -17
  2. orionis/console/contracts/schedule_event_listener.py +0 -18
  3. orionis/console/request/cli_request.py +2 -2
  4. orionis/foundation/config/app/entities/app.py +3 -2
  5. orionis/foundation/config/app/enums/ciphers.py +5 -19
  6. orionis/foundation/config/session/entities/session.py +2 -2
  7. orionis/foundation/providers/cli_request_provider.py +44 -0
  8. orionis/metadata/framework.py +1 -1
  9. orionis/services/encrypter/encrypter.py +115 -0
  10. orionis/services/environment/dynamic/caster.py +35 -27
  11. orionis/services/environment/key/key_generator.py +32 -11
  12. {orionis-0.545.0.dist-info → orionis-0.547.0.dist-info}/METADATA +1 -1
  13. {orionis-0.545.0.dist-info → orionis-0.547.0.dist-info}/RECORD +17 -160
  14. {orionis-0.545.0.dist-info → orionis-0.547.0.dist-info}/top_level.txt +0 -1
  15. tests/container/__init__.py +0 -0
  16. tests/container/context/__init__.py +0 -0
  17. tests/container/context/test_manager.py +0 -38
  18. tests/container/context/test_scope.py +0 -32
  19. tests/container/core/__init__.py +0 -0
  20. tests/container/core/test_advanced_async.py +0 -234
  21. tests/container/core/test_async_optimizations.py +0 -268
  22. tests/container/core/test_container.py +0 -453
  23. tests/container/core/test_singleton.py +0 -122
  24. tests/container/core/test_thread_safety.py +0 -90
  25. tests/container/entities/__init__.py +0 -0
  26. tests/container/entities/test_binding.py +0 -242
  27. tests/container/enums/__init__.py +0 -0
  28. tests/container/enums/test_lifetimes.py +0 -97
  29. tests/container/facades/__init__.py +0 -0
  30. tests/container/facades/test_facade.py +0 -78
  31. tests/container/mocks/__init__.py +0 -0
  32. tests/container/mocks/mock_advanced_async.py +0 -332
  33. tests/container/mocks/mock_async_optimizations.py +0 -407
  34. tests/container/mocks/mock_auto_resolution.py +0 -192
  35. tests/container/mocks/mock_complex_classes.py +0 -792
  36. tests/container/mocks/mock_simple_classes.py +0 -98
  37. tests/container/providers/__init__.py +0 -0
  38. tests/container/providers/test_providers.py +0 -55
  39. tests/container/validators/__init__.py +0 -0
  40. tests/container/validators/test_implements.py +0 -186
  41. tests/container/validators/test_is_abstract_class.py +0 -147
  42. tests/container/validators/test_is_callable.py +0 -102
  43. tests/container/validators/test_is_concrete_class.py +0 -160
  44. tests/container/validators/test_is_instance.py +0 -150
  45. tests/container/validators/test_is_not_subclass.py +0 -49
  46. tests/container/validators/test_is_subclass.py +0 -178
  47. tests/container/validators/test_is_valid_alias.py +0 -147
  48. tests/container/validators/test_lifetime.py +0 -106
  49. tests/example/__init__.py +0 -0
  50. tests/example/test_example.py +0 -725
  51. tests/foundation/__init__.py +0 -0
  52. tests/foundation/config/__init__.py +0 -0
  53. tests/foundation/config/app/__init__.py +0 -0
  54. tests/foundation/config/app/test_foundation_config_app.py +0 -262
  55. tests/foundation/config/auth/__init__.py +0 -0
  56. tests/foundation/config/auth/test_foundation_config_auth.py +0 -29
  57. tests/foundation/config/cache/__init__.py +0 -0
  58. tests/foundation/config/cache/test_foundation_config_cache.py +0 -143
  59. tests/foundation/config/cache/test_foundation_config_cache_file.py +0 -126
  60. tests/foundation/config/cache/test_foundation_config_cache_stores.py +0 -156
  61. tests/foundation/config/cors/__init__.py +0 -0
  62. tests/foundation/config/cors/test_foundation_config_cors.py +0 -190
  63. tests/foundation/config/database/__init__.py +0 -0
  64. tests/foundation/config/database/test_foundation_config_database.py +0 -158
  65. tests/foundation/config/database/test_foundation_config_database_connections.py +0 -203
  66. tests/foundation/config/database/test_foundation_config_database_mysql.py +0 -354
  67. tests/foundation/config/database/test_foundation_config_database_oracle.py +0 -288
  68. tests/foundation/config/database/test_foundation_config_database_pgsql.py +0 -257
  69. tests/foundation/config/database/test_foundation_config_database_sqlite.py +0 -207
  70. tests/foundation/config/filesystems/__init__.py +0 -0
  71. tests/foundation/config/filesystems/test_foundation_config_filesystems.py +0 -160
  72. tests/foundation/config/filesystems/test_foundation_config_filesystems_aws.py +0 -189
  73. tests/foundation/config/filesystems/test_foundation_config_filesystems_disks.py +0 -184
  74. tests/foundation/config/filesystems/test_foundation_config_filesystems_local.py +0 -143
  75. tests/foundation/config/filesystems/test_foundation_config_filesystems_public.py +0 -184
  76. tests/foundation/config/logging/__init__.py +0 -0
  77. tests/foundation/config/logging/test_foundation_config_logging.py +0 -112
  78. tests/foundation/config/logging/test_foundation_config_logging_channels.py +0 -246
  79. tests/foundation/config/logging/test_foundation_config_logging_chunked.py +0 -217
  80. tests/foundation/config/logging/test_foundation_config_logging_daily.py +0 -220
  81. tests/foundation/config/logging/test_foundation_config_logging_hourly.py +0 -196
  82. tests/foundation/config/logging/test_foundation_config_logging_monthly.py +0 -214
  83. tests/foundation/config/logging/test_foundation_config_logging_stack.py +0 -178
  84. tests/foundation/config/logging/test_foundation_config_logging_weekly.py +0 -224
  85. tests/foundation/config/mail/__init__.py +0 -0
  86. tests/foundation/config/mail/test_foundation_config_mail.py +0 -145
  87. tests/foundation/config/mail/test_foundation_config_mail_file.py +0 -97
  88. tests/foundation/config/mail/test_foundation_config_mail_mailers.py +0 -106
  89. tests/foundation/config/mail/test_foundation_config_mail_smtp.py +0 -146
  90. tests/foundation/config/queue/__init__.py +0 -0
  91. tests/foundation/config/queue/test_foundation_config_queue.py +0 -88
  92. tests/foundation/config/queue/test_foundation_config_queue_brokers.py +0 -72
  93. tests/foundation/config/queue/test_foundation_config_queue_database.py +0 -134
  94. tests/foundation/config/root/__init__.py +0 -0
  95. tests/foundation/config/root/test_foundation_config_root_paths.py +0 -112
  96. tests/foundation/config/session/__init__.py +0 -0
  97. tests/foundation/config/session/test_foundation_config_session.py +0 -213
  98. tests/foundation/config/startup/__init__.py +0 -0
  99. tests/foundation/config/startup/test_foundation_config_startup.py +0 -202
  100. tests/foundation/config/testing/__init__.py +0 -0
  101. tests/foundation/config/testing/test_foundation_config_testing.py +0 -235
  102. tests/metadata/__init__.py +0 -0
  103. tests/metadata/test_metadata_framework.py +0 -140
  104. tests/metadata/test_metadata_package.py +0 -139
  105. tests/services/__init__.py +0 -0
  106. tests/services/asynchrony/__init__.py +0 -0
  107. tests/services/asynchrony/test_services_asynchrony_coroutine.py +0 -85
  108. tests/services/environment/__init__.py +0 -0
  109. tests/services/environment/test_services_environment.py +0 -226
  110. tests/services/introspection/__init__.py +0 -0
  111. tests/services/introspection/dependencies/__init__.py +0 -0
  112. tests/services/introspection/dependencies/mocks/__init__.py +0 -0
  113. tests/services/introspection/dependencies/mocks/mock_user.py +0 -30
  114. tests/services/introspection/dependencies/mocks/mock_user_controller.py +0 -27
  115. tests/services/introspection/dependencies/mocks/mock_users_permissions.py +0 -41
  116. tests/services/introspection/dependencies/test_reflect_dependencies.py +0 -261
  117. tests/services/introspection/reflection/__init__.py +0 -0
  118. tests/services/introspection/reflection/mock/__init__.py +0 -0
  119. tests/services/introspection/reflection/mock/fake_reflect_instance.py +0 -1115
  120. tests/services/introspection/reflection/test_reflection_abstract.py +0 -1011
  121. tests/services/introspection/reflection/test_reflection_callable.py +0 -206
  122. tests/services/introspection/reflection/test_reflection_concrete.py +0 -952
  123. tests/services/introspection/reflection/test_reflection_instance.py +0 -1233
  124. tests/services/introspection/reflection/test_reflection_module.py +0 -567
  125. tests/services/introspection/test_reflection.py +0 -462
  126. tests/services/log/__init__.py +0 -0
  127. tests/services/log/test_log.py +0 -97
  128. tests/services/system/__init__.py +0 -0
  129. tests/services/system/test_services_system_imports.py +0 -204
  130. tests/services/system/test_services_system_workers.py +0 -131
  131. tests/support/__init__.py +0 -0
  132. tests/support/entities/__init__.py +0 -0
  133. tests/support/entities/mock_dataclass.py +0 -40
  134. tests/support/entities/test_base.py +0 -64
  135. tests/support/patterns/__init__.py +0 -0
  136. tests/support/patterns/singleton/__init__.py +0 -0
  137. tests/support/patterns/singleton/test_patterns_singleton.py +0 -39
  138. tests/support/standard/__init__.py +0 -0
  139. tests/support/standard/test_services_std.py +0 -226
  140. tests/support/wrapper/__init__.py +0 -0
  141. tests/support/wrapper/test_services_wrapper_docdict.py +0 -202
  142. tests/testing/__init__.py +0 -0
  143. tests/testing/cases/__init__.py +0 -0
  144. tests/testing/cases/test_testing_asynchronous.py +0 -63
  145. tests/testing/cases/test_testing_synchronous.py +0 -57
  146. tests/testing/entities/__init__.py +0 -0
  147. tests/testing/entities/test_testing_result.py +0 -146
  148. tests/testing/enums/__init__.py +0 -0
  149. tests/testing/enums/test_testing_status.py +0 -63
  150. tests/testing/output/__init__.py +0 -0
  151. tests/testing/output/test_testing_dumper.py +0 -29
  152. tests/testing/output/test_testing_printer.py +0 -42
  153. tests/testing/records/__init__.py +0 -0
  154. tests/testing/records/test_testing_records.py +0 -171
  155. tests/testing/test_testing_unit.py +0 -164
  156. tests/testing/validators/__init__.py +0 -0
  157. tests/testing/validators/test_testing_validators.py +0 -392
  158. tests/testing/view/__init__.py +0 -0
  159. tests/testing/view/test_render.py +0 -30
  160. {orionis-0.545.0.dist-info → orionis-0.547.0.dist-info}/WHEEL +0 -0
  161. {orionis-0.545.0.dist-info → orionis-0.547.0.dist-info}/licenses/LICENCE +0 -0
  162. {orionis-0.545.0.dist-info → orionis-0.547.0.dist-info}/zip-safe +0 -0
@@ -1,106 +0,0 @@
1
- from orionis.container.validators.lifetime import LifetimeValidator
2
- from orionis.container.enums.lifetimes import Lifetime
3
- from orionis.container.exceptions.type import OrionisContainerTypeError
4
- from orionis.test.cases.asynchronous import AsyncTestCase
5
-
6
- class TestLifetimeValidator(AsyncTestCase):
7
-
8
- async def testValidLifetimeEnumValues(self) -> None:
9
- """
10
- Validate that LifetimeValidator correctly accepts Lifetime enum values.
11
-
12
- This test checks that the validator returns the corresponding Lifetime enum
13
- when provided with valid enum values.
14
-
15
- Returns
16
- -------
17
- None
18
- This method does not return anything. It asserts correctness via test assertions.
19
- """
20
- # Assert that each Lifetime enum value is accepted and returned as expected
21
- self.assertEqual(LifetimeValidator(Lifetime.TRANSIENT), Lifetime.TRANSIENT)
22
- self.assertEqual(LifetimeValidator(Lifetime.SINGLETON), Lifetime.SINGLETON)
23
- self.assertEqual(LifetimeValidator(Lifetime.SCOPED), Lifetime.SCOPED)
24
-
25
- async def testValidLifetimeStringValues(self) -> None:
26
- """
27
- Validate that LifetimeValidator correctly accepts valid string representations.
28
-
29
- This test verifies that the validator returns the correct Lifetime enum when
30
- provided with valid string representations, including different cases and extra whitespace.
31
-
32
- Returns
33
- -------
34
- None
35
- This method does not return anything. It asserts correctness via test assertions.
36
- """
37
- # Assert that valid uppercase string representations are accepted
38
- self.assertEqual(LifetimeValidator("TRANSIENT"), Lifetime.TRANSIENT)
39
- self.assertEqual(LifetimeValidator("SINGLETON"), Lifetime.SINGLETON)
40
- self.assertEqual(LifetimeValidator("SCOPED"), Lifetime.SCOPED)
41
-
42
- # Assert that lowercase and mixed case strings are accepted
43
- self.assertEqual(LifetimeValidator("transient"), Lifetime.TRANSIENT)
44
- self.assertEqual(LifetimeValidator("Singleton"), Lifetime.SINGLETON)
45
- self.assertEqual(LifetimeValidator("scoped"), Lifetime.SCOPED)
46
-
47
- # Assert that strings with extra whitespace are accepted
48
- self.assertEqual(LifetimeValidator(" TRANSIENT "), Lifetime.TRANSIENT)
49
- self.assertEqual(LifetimeValidator(" singleton "), Lifetime.SINGLETON)
50
-
51
- async def testInvalidLifetimeStringValue(self) -> None:
52
- """
53
- Validate that LifetimeValidator raises an error for invalid string values.
54
-
55
- This test ensures that the validator raises OrionisContainerTypeError when
56
- provided with an invalid string representation, and that the error message
57
- contains information about valid options.
58
-
59
- Returns
60
- -------
61
- None
62
- This method does not return anything. It asserts correctness via test assertions.
63
- """
64
- # Attempt to validate an invalid string and check for the expected exception
65
- with self.assertRaises(OrionisContainerTypeError) as context:
66
- LifetimeValidator("INVALID_LIFETIME")
67
-
68
- # Assert that the error message contains relevant information
69
- self.assertIn("Invalid lifetime 'INVALID_LIFETIME'", str(context.exception))
70
- self.assertIn("Valid options are:", str(context.exception))
71
- self.assertIn("TRANSIENT", str(context.exception))
72
- self.assertIn("SINGLETON", str(context.exception))
73
- self.assertIn("SCOPED", str(context.exception))
74
-
75
- async def testInvalidLifetimeType(self) -> None:
76
- """
77
- Validate that LifetimeValidator raises an error for invalid input types.
78
-
79
- This test checks that the validator raises OrionisContainerTypeError when
80
- provided with values of types other than str or Lifetime enum.
81
-
82
- Returns
83
- -------
84
- None
85
- This method does not return anything. It asserts correctness via test assertions.
86
- """
87
- # List of invalid types to test
88
- invalid_values = [
89
- 123,
90
- 3.14,
91
- None,
92
- True,
93
- False,
94
- [],
95
- {},
96
- (),
97
- set()
98
- ]
99
-
100
- # Assert that each invalid type raises the expected exception
101
- for value in invalid_values:
102
- with self.assertRaises(OrionisContainerTypeError) as context:
103
- LifetimeValidator(value)
104
-
105
- expected_msg = f"Lifetime must be of type str or Lifetime enum, got {type(value).__name__}."
106
- self.assertEqual(str(context.exception), expected_msg)
tests/example/__init__.py DELETED
File without changes