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,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