orionis 0.285.0__py3-none-any.whl → 0.287.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/metadata/framework.py +1 -1
- orionis/services/asynchrony/contracts/__init__.py +0 -0
- orionis/services/asynchrony/contracts/coroutines.py +24 -0
- orionis/services/asynchrony/coroutines.py +58 -19
- orionis/services/asynchrony/exceptions/coroutine_exception.py +8 -15
- orionis/services/environment/contracts/env.py +45 -50
- orionis/services/environment/dot_env.py +205 -181
- orionis/services/environment/env.py +68 -85
- orionis/services/environment/exceptions/environment_value_error.py +18 -0
- orionis/services/environment/exceptions/environment_value_exception.py +23 -0
- orionis/services/environment/type_hint.py +559 -0
- orionis/test/exceptions/test_config_exception.py +8 -17
- orionis/test/exceptions/test_failure_exception.py +27 -27
- orionis/test/exceptions/test_persistence_error.py +10 -20
- orionis/test/exceptions/test_runtime_error.py +8 -15
- orionis/test/exceptions/test_value_error.py +8 -15
- orionis/test/logs/history.py +3 -5
- {orionis-0.285.0.dist-info → orionis-0.287.0.dist-info}/METADATA +1 -1
- {orionis-0.285.0.dist-info → orionis-0.287.0.dist-info}/RECORD +66 -62
- tests/example/test_example.py +5 -2
- tests/foundation/config/app/test_app.py +13 -3
- tests/foundation/config/auth/test_auth.py +9 -4
- tests/foundation/config/cache/test_cache.py +60 -15
- tests/foundation/config/cache/test_cache_file.py +62 -14
- tests/foundation/config/cache/test_cache_stores.py +74 -14
- tests/foundation/config/cors/test_cors.py +102 -33
- tests/foundation/config/database/test_database.py +38 -14
- tests/foundation/config/database/test_database_connections.py +79 -5
- tests/foundation/config/database/test_database_mysql.py +138 -15
- tests/foundation/config/database/test_database_oracle.py +110 -26
- tests/foundation/config/database/test_database_pgsql.py +96 -26
- tests/foundation/config/database/test_database_sqlite.py +56 -2
- tests/foundation/config/exceptions/test_exceptions_integrity.py +44 -10
- tests/foundation/config/filesystems/test_filesystems.py +64 -14
- tests/foundation/config/filesystems/test_filesystems_aws.py +45 -7
- tests/foundation/config/filesystems/test_filesystems_disks.py +78 -8
- tests/foundation/config/filesystems/test_filesystems_local.py +66 -18
- tests/foundation/config/filesystems/test_filesystems_public.py +37 -0
- tests/foundation/config/logging/test_logging.py +75 -11
- tests/foundation/config/logging/test_logging_channels.py +79 -2
- tests/foundation/config/logging/test_logging_chunked.py +85 -12
- tests/foundation/config/logging/test_logging_daily.py +79 -12
- tests/foundation/config/logging/test_logging_hourly.py +68 -2
- tests/foundation/config/logging/test_logging_monthly.py +48 -2
- tests/foundation/config/logging/test_logging_stack.py +49 -14
- tests/foundation/config/logging/test_logging_weekly.py +92 -2
- tests/foundation/config/mail/test_mail.py +87 -15
- tests/foundation/config/mail/test_mail_file.py +40 -4
- tests/foundation/config/mail/test_mail_mailers.py +56 -8
- tests/foundation/config/mail/test_mail_smtp.py +58 -14
- tests/foundation/config/queue/test_queue.py +62 -9
- tests/foundation/config/queue/test_queue_brokers.py +27 -10
- tests/foundation/config/queue/test_queue_database.py +53 -15
- tests/foundation/config/root/test_root_paths.py +69 -2
- tests/foundation/config/session/test_session.py +30 -1
- tests/foundation/config/startup/test_config_startup.py +77 -7
- tests/foundation/config/testing/test_testing.py +68 -0
- tests/patterns/singleton/test_singleton.py +10 -1
- tests/services/asynchrony/test_async_io.py +4 -4
- tests/services/environment/test_env.py +3 -4
- tests/testing/test_testing_result.py +56 -19
- tests/testing/test_testing_unit.py +93 -24
- orionis/services/environment/exceptions/value_exception.py +0 -27
- {orionis-0.285.0.dist-info → orionis-0.287.0.dist-info}/WHEEL +0 -0
- {orionis-0.285.0.dist-info → orionis-0.287.0.dist-info}/licenses/LICENCE +0 -0
- {orionis-0.285.0.dist-info → orionis-0.287.0.dist-info}/top_level.txt +0 -0
- {orionis-0.285.0.dist-info → orionis-0.287.0.dist-info}/zip-safe +0 -0
@@ -1,23 +1,13 @@
|
|
1
1
|
class OrionisTestPersistenceError(Exception):
|
2
|
-
"""
|
3
|
-
Custom exception for persistence errors in tests within the Orionis framework.
|
4
|
-
|
5
|
-
This exception is used to indicate issues related to data persistence during test execution,
|
6
|
-
providing a descriptive message to help identify and resolve the error.
|
7
|
-
|
8
|
-
Args:
|
9
|
-
msg (str): A descriptive message explaining the cause of the persistence error.
|
10
|
-
|
11
|
-
Example:
|
12
|
-
raise OrionisTestPersistenceError("Failed to save test state to the database.")
|
13
|
-
"""
|
14
2
|
|
15
3
|
def __init__(self, msg: str):
|
16
4
|
"""
|
17
|
-
|
5
|
+
Initialize the OrionisTestPersistenceError with a specific error message.
|
18
6
|
|
19
|
-
|
20
|
-
|
7
|
+
Parameters
|
8
|
+
----------
|
9
|
+
msg : str
|
10
|
+
Descriptive error message explaining the cause of the exception.
|
21
11
|
"""
|
22
12
|
super().__init__(msg)
|
23
13
|
|
@@ -25,10 +15,10 @@ class OrionisTestPersistenceError(Exception):
|
|
25
15
|
"""
|
26
16
|
Returns a formatted string representation of the exception.
|
27
17
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
18
|
+
Returns
|
19
|
+
-------
|
20
|
+
str
|
21
|
+
A formatted string describing the exception, including the exception
|
22
|
+
name and the error message.
|
33
23
|
"""
|
34
24
|
return f"{self.__class__.__name__}: {self.args[0]}"
|
@@ -1,26 +1,19 @@
|
|
1
1
|
class OrionisTestRuntimeError(Exception):
|
2
|
-
"""
|
3
|
-
Exception raised for errors that occur during the runtime of Orionis tests.
|
4
|
-
This exception is intended to provide a clear and descriptive error message
|
5
|
-
when a runtime error is encountered in the Orionis testing framework.
|
6
|
-
Attributes:
|
7
|
-
Example:
|
8
|
-
raise OrionisTestRuntimeError("An unexpected runtime error occurred during testing.")
|
9
|
-
"""
|
10
2
|
|
11
3
|
def __init__(self, msg: str):
|
12
4
|
"""
|
13
|
-
|
14
|
-
|
15
|
-
|
5
|
+
Parameters
|
6
|
+
----------
|
7
|
+
msg : str
|
8
|
+
The error message describing the runtime error.
|
16
9
|
"""
|
17
10
|
super().__init__(msg)
|
18
11
|
|
19
12
|
def __str__(self) -> str:
|
20
13
|
"""
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
14
|
+
Returns
|
15
|
+
-------
|
16
|
+
str
|
17
|
+
String representation of the exception in the format '<ClassName>: <first argument>'.
|
25
18
|
"""
|
26
19
|
return f"{self.__class__.__name__}: {self.args[0]}"
|
@@ -1,26 +1,19 @@
|
|
1
1
|
class OrionisTestValueError(Exception):
|
2
|
-
"""
|
3
|
-
Custom exception class for handling value errors in the Orionis test framework.
|
4
|
-
This exception should be raised when a value-related error occurs during testing.
|
5
|
-
It provides a formatted string representation that includes the class name and the error message.
|
6
|
-
Example:
|
7
|
-
raise OrionisTestValueError("Invalid value provided.")
|
8
|
-
"""
|
9
2
|
|
10
3
|
def __init__(self, msg: str):
|
11
4
|
"""
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
5
|
+
Parameters
|
6
|
+
----------
|
7
|
+
msg : str
|
8
|
+
The error message describing the exception.
|
16
9
|
"""
|
17
10
|
super().__init__(msg)
|
18
11
|
|
19
12
|
def __str__(self) -> str:
|
20
13
|
"""
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
14
|
+
Returns
|
15
|
+
-------
|
16
|
+
str
|
17
|
+
A formatted string in the form 'ClassName: message', including the class name and the first argument.
|
25
18
|
"""
|
26
19
|
return f"{self.__class__.__name__}: {self.args[0]}"
|
orionis/test/logs/history.py
CHANGED
@@ -54,7 +54,7 @@ class TestHistory(ITestHistory):
|
|
54
54
|
if db_path.is_dir():
|
55
55
|
db_path = db_path / self.__db_name
|
56
56
|
else:
|
57
|
-
env_path = Env.get(
|
57
|
+
env_path = Env.get("TEST_DB_PATH", None)
|
58
58
|
if env_path:
|
59
59
|
db_path = Path(env_path).expanduser().resolve()
|
60
60
|
if db_path.is_dir():
|
@@ -66,7 +66,7 @@ class TestHistory(ITestHistory):
|
|
66
66
|
db_path.parent.mkdir(parents=True, exist_ok=True)
|
67
67
|
|
68
68
|
# Store path in environment
|
69
|
-
Env.set(
|
69
|
+
Env.set("TEST_DB_PATH", str(db_path), 'path')
|
70
70
|
self.__db_path = db_path
|
71
71
|
|
72
72
|
# Create a connection to the database, initially set to None
|
@@ -89,8 +89,6 @@ class TestHistory(ITestHistory):
|
|
89
89
|
self._conn = sqlite3.connect(str(self.__db_path))
|
90
90
|
except (sqlite3.Error, Exception) as e:
|
91
91
|
raise OrionisTestPersistenceError(f"Database connection error: {e}")
|
92
|
-
finally:
|
93
|
-
self._conn = None
|
94
92
|
|
95
93
|
def __createTableIfNotExists(self) -> bool:
|
96
94
|
"""
|
@@ -177,7 +175,7 @@ class TestHistory(ITestHistory):
|
|
177
175
|
# Validate report structure
|
178
176
|
missing = []
|
179
177
|
for key in fields:
|
180
|
-
if key not in report:
|
178
|
+
if key not in report and key != "json":
|
181
179
|
missing.append(key)
|
182
180
|
if missing:
|
183
181
|
raise OrionisTestValueError(f"Missing report fields: {missing}")
|
@@ -226,23 +226,27 @@ orionis/foundation/config/testing/entities/testing.py,sha256=m_i9jZlOXs_AzNKNNf0
|
|
226
226
|
orionis/foundation/config/testing/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
227
227
|
orionis/foundation/config/testing/enums/test_mode.py,sha256=IbFpauu7J-iSAfmC8jDbmTEYl8eZr-AexL-lyOh8_74,337
|
228
228
|
orionis/metadata/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
229
|
-
orionis/metadata/framework.py,sha256=
|
229
|
+
orionis/metadata/framework.py,sha256=AMr8GQun6r2ieB-bEnyxL5j1od8trSPhHlukFVLN-do,4960
|
230
230
|
orionis/metadata/package.py,sha256=5p4fxjPpaktsreJ458pAl-Oi1363MWACPQvqXi_N6oA,6704
|
231
231
|
orionis/patterns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
232
232
|
orionis/patterns/singleton/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
233
233
|
orionis/patterns/singleton/meta_class.py,sha256=YN5mSSQeIX_Gh_TK5HD-ms6IYBTRsRcuzoUtpX-9kYY,2134
|
234
234
|
orionis/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
235
235
|
orionis/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
236
|
-
orionis/services/asynchrony/coroutines.py,sha256=
|
236
|
+
orionis/services/asynchrony/coroutines.py,sha256=i-r6P_-kA-7TTUhfXBS2XStbvaF7_9kpuB15ScScwYg,2294
|
237
|
+
orionis/services/asynchrony/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
238
|
+
orionis/services/asynchrony/contracts/coroutines.py,sha256=Wuwp2k4HXAX-tQ3waVIT8AmzX_HeIbjliRchKIqy2k0,688
|
237
239
|
orionis/services/asynchrony/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
238
|
-
orionis/services/asynchrony/exceptions/coroutine_exception.py,sha256=
|
240
|
+
orionis/services/asynchrony/exceptions/coroutine_exception.py,sha256=sZxC6tabTcq0HUJfKmeduYoe2C_NGzTMXf3nWrnobsU,508
|
239
241
|
orionis/services/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
240
|
-
orionis/services/environment/dot_env.py,sha256=
|
241
|
-
orionis/services/environment/env.py,sha256=
|
242
|
+
orionis/services/environment/dot_env.py,sha256=0pG4zaNPOk7bn1vOifnladIAnaehfJLkORu9eingpC0,10075
|
243
|
+
orionis/services/environment/env.py,sha256=jbELcOGNvTslgs96j3PNisEy6967SifV3rourHnnxR4,2799
|
244
|
+
orionis/services/environment/type_hint.py,sha256=G03TpgJqzQ7tUVvSeVJefV6tC8d41jui2UnCAaAUIOI,17709
|
242
245
|
orionis/services/environment/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
243
|
-
orionis/services/environment/contracts/env.py,sha256=
|
246
|
+
orionis/services/environment/contracts/env.py,sha256=7lezGxABAG63pEEvzAmHXgr9izBI6TCp05Trx_SRvc4,2054
|
244
247
|
orionis/services/environment/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
245
|
-
orionis/services/environment/exceptions/
|
248
|
+
orionis/services/environment/exceptions/environment_value_error.py,sha256=Y3QTwzUrn0D5FqT7hI_9uCACVz473YhhoAFOx1-rcXE,627
|
249
|
+
orionis/services/environment/exceptions/environment_value_exception.py,sha256=zlxRFJwi0Yj-xFHQUvZ8X1ZlxRDDVv7Xcw-w4qCocL4,646
|
246
250
|
orionis/services/introspection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
247
251
|
orionis/services/introspection/reflection.py,sha256=tQtE5WnmdNOpZN8BIyAnfrGHXz7wgy8YE-yaurYfIz8,7763
|
248
252
|
orionis/services/introspection/abstracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -325,13 +329,13 @@ orionis/test/enums/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
|
|
325
329
|
orionis/test/enums/test_mode.py,sha256=CHstYZ180MEX84AjZIoyA1l8gKxFLp_eciLOj2in57E,481
|
326
330
|
orionis/test/enums/test_status.py,sha256=vNKRmp1lud_ZGTayf3A8wO_0vEYdFABy_oMw-RcEc1c,673
|
327
331
|
orionis/test/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
328
|
-
orionis/test/exceptions/test_config_exception.py,sha256=
|
329
|
-
orionis/test/exceptions/test_failure_exception.py,sha256=
|
330
|
-
orionis/test/exceptions/test_persistence_error.py,sha256=
|
331
|
-
orionis/test/exceptions/test_runtime_error.py,sha256=
|
332
|
-
orionis/test/exceptions/test_value_error.py,sha256=
|
332
|
+
orionis/test/exceptions/test_config_exception.py,sha256=v7LhxqrUUTqx-42yCCAAWIFb_Ut6rqcGPKCVRZ_Ib4w,548
|
333
|
+
orionis/test/exceptions/test_failure_exception.py,sha256=IwmBRiDMAJ4Jk75-kfQh5mWfX3HHzx4pP-ZM_EwRcaE,1787
|
334
|
+
orionis/test/exceptions/test_persistence_error.py,sha256=QJ2hdVAl6ngZEko0mSavU7nui8si7ZXR9PUXfU9cOY0,724
|
335
|
+
orionis/test/exceptions/test_runtime_error.py,sha256=QahR7qHhvzR1I8CS-qWsxL_c0lSzWWE1rCiwf47YRQc,523
|
336
|
+
orionis/test/exceptions/test_value_error.py,sha256=XZmxiZmmMoYoh8O4V97GLB-Ooh-IRVagKW9bWPvtoeo,533
|
333
337
|
orionis/test/logs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
334
|
-
orionis/test/logs/history.py,sha256=
|
338
|
+
orionis/test/logs/history.py,sha256=YqoAQSYyEo9PQSbB7TsHZy3SLKrwLsgyiKu7t2M7ztc,13149
|
335
339
|
orionis/test/logs/contracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
336
340
|
orionis/test/logs/contracts/history.py,sha256=v3vjWmvn73DF_C8Ur-aWdHUMrztX584mXKwYgsYQgCE,1435
|
337
341
|
orionis/test/output/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -346,71 +350,71 @@ orionis/test/suites/contracts/test_suite.py,sha256=eluzYwkNBbKjxYStj_tHN_Fm3YDPp
|
|
346
350
|
orionis/test/suites/contracts/test_unit.py,sha256=l1LQllODyvcSByXMl1lGrUkoLsXbBHZZLWZI4A-mlQg,5881
|
347
351
|
orionis/test/view/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
348
352
|
orionis/test/view/index.html,sha256=U4XYO4hA-mAJCK1gcVRgIysmISK3g3Vgi2ntLofFAhE,6592
|
349
|
-
orionis-0.
|
353
|
+
orionis-0.287.0.dist-info/licenses/LICENCE,sha256=-_4cF2EBKuYVS_SQpy1uapq0oJPUU1vl_RUWSy2jJTo,1111
|
350
354
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
351
355
|
tests/example/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
352
|
-
tests/example/test_example.py,sha256=
|
356
|
+
tests/example/test_example.py,sha256=byd_lI6tVDgGPEIrr7PLZbBu0UoZOymmdmyA_4u-QUw,601
|
353
357
|
tests/foundation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
354
358
|
tests/foundation/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
355
359
|
tests/foundation/config/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
356
|
-
tests/foundation/config/app/test_app.py,sha256
|
360
|
+
tests/foundation/config/app/test_app.py,sha256=MM2DE40Mj0q0bS3tHNgiPktNZT9E4nmHdlQ6wN-Kq1E,5555
|
357
361
|
tests/foundation/config/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
358
|
-
tests/foundation/config/auth/test_auth.py,sha256=
|
362
|
+
tests/foundation/config/auth/test_auth.py,sha256=9Yu3B_F5WuFkG2hRkkF2P49MHvWS1fm8i-YgODTvspA,1015
|
359
363
|
tests/foundation/config/cache/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
360
|
-
tests/foundation/config/cache/test_cache.py,sha256=
|
361
|
-
tests/foundation/config/cache/test_cache_file.py,sha256=
|
362
|
-
tests/foundation/config/cache/test_cache_stores.py,sha256=
|
364
|
+
tests/foundation/config/cache/test_cache.py,sha256=JC6yE6lqbbP3sJGBzr7dVcfB064ZyXDLElzJB41O83Y,4628
|
365
|
+
tests/foundation/config/cache/test_cache_file.py,sha256=oDjX1YbzA8bXpUq2EbPgEsFUkg-mhlak4YqBKvn4GRY,3644
|
366
|
+
tests/foundation/config/cache/test_cache_stores.py,sha256=X3Sy6Nmceo4HRlqa3QVJkn6z36KS7Zqv_z3pEsF-lhg,4554
|
363
367
|
tests/foundation/config/cors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
364
|
-
tests/foundation/config/cors/test_cors.py,sha256
|
368
|
+
tests/foundation/config/cors/test_cors.py,sha256=IyeC9wakPSCXT19ASfF1g8gXNh_vRkTie9oSm-yBm04,6696
|
365
369
|
tests/foundation/config/database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
366
|
-
tests/foundation/config/database/test_database.py,sha256=
|
367
|
-
tests/foundation/config/database/test_database_connections.py,sha256=
|
368
|
-
tests/foundation/config/database/test_database_mysql.py,sha256=
|
369
|
-
tests/foundation/config/database/test_database_oracle.py,sha256=
|
370
|
-
tests/foundation/config/database/test_database_pgsql.py,sha256=
|
371
|
-
tests/foundation/config/database/test_database_sqlite.py,sha256=
|
370
|
+
tests/foundation/config/database/test_database.py,sha256=5VvZdTzrK-LVcIqBC4WZMr1__LMRzzzykzEHEwdEe9E,4821
|
371
|
+
tests/foundation/config/database/test_database_connections.py,sha256=ld-Mj2wV4js1_yr6lNKYZ0DZDdtkOCqOjOAfNO_zcho,6944
|
372
|
+
tests/foundation/config/database/test_database_mysql.py,sha256=O2yA24Y_iELV71Wpw-c0BCJqMo6ILVNruLUhWiuuAcI,12399
|
373
|
+
tests/foundation/config/database/test_database_oracle.py,sha256=miiSdqwDEZm-9BrxZSCoHIiKGzMDcjeTrDgV4hsBSl8,10380
|
374
|
+
tests/foundation/config/database/test_database_pgsql.py,sha256=9XurJGimFS6TGkcnmdKopkd7-wJjVZL2ua9KKiT2Pdc,8498
|
375
|
+
tests/foundation/config/database/test_database_sqlite.py,sha256=N4eQuBz6ja5KVui1AThfvlf05_dOzW2pWeyvLB_MO5g,7329
|
372
376
|
tests/foundation/config/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
373
|
-
tests/foundation/config/exceptions/test_exceptions_integrity.py,sha256=
|
377
|
+
tests/foundation/config/exceptions/test_exceptions_integrity.py,sha256=HrTZavbqDmO4rM6umY4wTb615_0o0yH58Lgz6yjwkYA,4262
|
374
378
|
tests/foundation/config/filesystems/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
375
|
-
tests/foundation/config/filesystems/test_filesystems.py,sha256=
|
376
|
-
tests/foundation/config/filesystems/test_filesystems_aws.py,sha256=
|
377
|
-
tests/foundation/config/filesystems/test_filesystems_disks.py,sha256=
|
378
|
-
tests/foundation/config/filesystems/test_filesystems_local.py,sha256=
|
379
|
-
tests/foundation/config/filesystems/test_filesystems_public.py,sha256=
|
379
|
+
tests/foundation/config/filesystems/test_filesystems.py,sha256=NPU813Jttr4PT7tNVzvjVKhZwFp6-JzwngJWzDxPfac,5253
|
380
|
+
tests/foundation/config/filesystems/test_filesystems_aws.py,sha256=eFGYPD_XRDzyurBt-W_WsC0Q2I4iTmlvZROXIUwxG9I,5860
|
381
|
+
tests/foundation/config/filesystems/test_filesystems_disks.py,sha256=79MlgiBLdDAm4YR5cL-Z7QDGbe6czujdizeN_6bVlbc,6438
|
382
|
+
tests/foundation/config/filesystems/test_filesystems_local.py,sha256=fDGZwSn-DxG_ofm4jXvXRq-BsALauUn2_CPfvr1fEaY,4260
|
383
|
+
tests/foundation/config/filesystems/test_filesystems_public.py,sha256=C-rUSumGekqRUIJ622KLLBcpltbflFevUbV0fatpBn8,5864
|
380
384
|
tests/foundation/config/logging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
381
|
-
tests/foundation/config/logging/test_logging.py,sha256=
|
382
|
-
tests/foundation/config/logging/test_logging_channels.py,sha256=
|
383
|
-
tests/foundation/config/logging/test_logging_chunked.py,sha256=
|
384
|
-
tests/foundation/config/logging/test_logging_daily.py,sha256=
|
385
|
-
tests/foundation/config/logging/test_logging_hourly.py,sha256=
|
386
|
-
tests/foundation/config/logging/test_logging_monthly.py,sha256=
|
387
|
-
tests/foundation/config/logging/test_logging_stack.py,sha256=
|
388
|
-
tests/foundation/config/logging/test_logging_weekly.py,sha256=
|
385
|
+
tests/foundation/config/logging/test_logging.py,sha256=ulZLvIYdFraPyB3u0GW63gHRfNcnWHUlH3uWve05kDE,3152
|
386
|
+
tests/foundation/config/logging/test_logging_channels.py,sha256=REnYWHl3UafOthE_RF9a39zW8H-JWTEirmvBJcOMBcA,8958
|
387
|
+
tests/foundation/config/logging/test_logging_chunked.py,sha256=oJxtyOL6pa6MsSZN6WtTIwq3dhsM7Vza9Z3_fHonPoY,7806
|
388
|
+
tests/foundation/config/logging/test_logging_daily.py,sha256=ZKphLd8F9sdGw68o7eklKHxbbSI0GKO3iKBdSbfBN8Q,7084
|
389
|
+
tests/foundation/config/logging/test_logging_hourly.py,sha256=cTa6b8SQEA_y-CXTXkXx5440dezIkpKmuiYPFikIjjM,6797
|
390
|
+
tests/foundation/config/logging/test_logging_monthly.py,sha256=VgGrcwsOAJMVQmuswP2olZqrykhAQuroxBNXxYy_3aw,6407
|
391
|
+
tests/foundation/config/logging/test_logging_stack.py,sha256=MP9U8lvHjwuDPH-k_raIUsyLt1-4vV4siUEo3N7vMg8,5475
|
392
|
+
tests/foundation/config/logging/test_logging_weekly.py,sha256=JqCRlFF1Fy-o8BlpYCzE3dP7lxLVeHHJPixoJMNiVVk,7603
|
389
393
|
tests/foundation/config/mail/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
390
|
-
tests/foundation/config/mail/test_mail.py,sha256=
|
391
|
-
tests/foundation/config/mail/test_mail_file.py,sha256=
|
392
|
-
tests/foundation/config/mail/test_mail_mailers.py,sha256=
|
393
|
-
tests/foundation/config/mail/test_mail_smtp.py,sha256=
|
394
|
+
tests/foundation/config/mail/test_mail.py,sha256=5Ab8bw8F0L9SsihXyPzovYaY1SCH4yXZPNjDG-Bi1jE,4178
|
395
|
+
tests/foundation/config/mail/test_mail_file.py,sha256=09gHW--u0mtW5ASV_v1rGnsICOTU3FDqjeB7ioUfwE0,2992
|
396
|
+
tests/foundation/config/mail/test_mail_mailers.py,sha256=lF3N9oZ_owdG4lUFn5uHGP8KkGZYQlaJ9Xd4BrmIRog,3392
|
397
|
+
tests/foundation/config/mail/test_mail_smtp.py,sha256=c-I7QG_zRwwJsAxEGkJvyPVyMb-RIOb8gmQsiTjeDXA,4848
|
394
398
|
tests/foundation/config/queue/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
395
|
-
tests/foundation/config/queue/test_queue.py,sha256=
|
396
|
-
tests/foundation/config/queue/test_queue_brokers.py,sha256=
|
397
|
-
tests/foundation/config/queue/test_queue_database.py,sha256=
|
399
|
+
tests/foundation/config/queue/test_queue.py,sha256=CJedLP8574GgKFrea2OiS5eOHQfJTGo35LdUuygm8OI,3440
|
400
|
+
tests/foundation/config/queue/test_queue_brokers.py,sha256=zD2z5ydCKAZHcD3VINNum_KIgGEHojBu8iz2HOt5Cn8,3015
|
401
|
+
tests/foundation/config/queue/test_queue_database.py,sha256=sZRDVAJCXM4u3UIf8hPoulOqub6qdfI_xCJ-p_pvx9o,4797
|
398
402
|
tests/foundation/config/root/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
399
|
-
tests/foundation/config/root/test_root_paths.py,sha256=
|
403
|
+
tests/foundation/config/root/test_root_paths.py,sha256=HcRqZzh1Ym86wzN_tpFrvv8GHLGCgfJoe1DSnmIxdHE,7077
|
400
404
|
tests/foundation/config/session/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
401
|
-
tests/foundation/config/session/test_session.py,sha256=
|
405
|
+
tests/foundation/config/session/test_session.py,sha256=ov3nLx4yMegkQ4ke6Mmki9DSwZGjPZ4kFoSwUX5eShM,6369
|
402
406
|
tests/foundation/config/startup/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
403
|
-
tests/foundation/config/startup/test_config_startup.py,sha256=
|
407
|
+
tests/foundation/config/startup/test_config_startup.py,sha256=zA25AII9Hsf_zIckVIvYEoCwpF8FnleDUORUBi4Vy5M,6870
|
404
408
|
tests/foundation/config/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
405
|
-
tests/foundation/config/testing/test_testing.py,sha256=
|
409
|
+
tests/foundation/config/testing/test_testing.py,sha256=SJ3PQdIX_uokrDoU6z_y1-nNEHInaBv_y-R4rxDQrHo,8206
|
406
410
|
tests/patterns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
407
411
|
tests/patterns/singleton/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
408
|
-
tests/patterns/singleton/test_singleton.py,sha256=
|
412
|
+
tests/patterns/singleton/test_singleton.py,sha256=De2BcRLEyrA1PjYJHwQNigk-ACGLw7SUIXvj2hPgBSI,949
|
409
413
|
tests/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
410
414
|
tests/services/asynchrony/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
411
|
-
tests/services/asynchrony/test_async_io.py,sha256=
|
415
|
+
tests/services/asynchrony/test_async_io.py,sha256=RnsL7S5rNaijMK8aUJCzZvfha9pqAqxsqxd32x03r7E,1638
|
412
416
|
tests/services/environment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
413
|
-
tests/services/environment/test_env.py,sha256=
|
417
|
+
tests/services/environment/test_env.py,sha256=LPrfpT3cAOkPVKfviUkFy_j87BcyRB-Bw9Hm5c45F4c,6899
|
414
418
|
tests/services/inspection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
415
419
|
tests/services/inspection/dependencies/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
416
420
|
tests/services/inspection/dependencies/test_reflect_dependencies.py,sha256=z0C9KkhV27Y7jKpLSCN9XCmHbjJDCPbBb7NkRFs3oMI,5803
|
@@ -442,10 +446,10 @@ tests/support/inspection/fakes/fake_reflection_concrete.py,sha256=j6gzsxE3xq5oJ3
|
|
442
446
|
tests/support/inspection/fakes/fake_reflection_concrete_with_abstract.py,sha256=ibCjrtNM6BMf5Z5VMvat7E6zOAk5g9z--gj4ykKJWY8,2118
|
443
447
|
tests/support/inspection/fakes/fake_reflection_instance_with_abstract.py,sha256=SfL8FuFmr650RlzXTrP4tGMfsPVZLhOxVnBXu_g1POg,1471
|
444
448
|
tests/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
445
|
-
tests/testing/test_testing_result.py,sha256=
|
446
|
-
tests/testing/test_testing_unit.py,sha256=
|
447
|
-
orionis-0.
|
448
|
-
orionis-0.
|
449
|
-
orionis-0.
|
450
|
-
orionis-0.
|
451
|
-
orionis-0.
|
449
|
+
tests/testing/test_testing_result.py,sha256=Q6z4B3oTDD6X5adWzVrRzRfoJeTKL0Cm3ePu47jfrmM,4312
|
450
|
+
tests/testing/test_testing_unit.py,sha256=W8vVzfhmFYXff0NcZg0L3SC4zxRHJxj47WZYsNcclv8,7780
|
451
|
+
orionis-0.287.0.dist-info/METADATA,sha256=D7bow-1ADEnkq1xqdvqmNhwQOHDw0uor86Gw_LmXNsI,4772
|
452
|
+
orionis-0.287.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
453
|
+
orionis-0.287.0.dist-info/top_level.txt,sha256=2bdoHgyGZhOtLAXS6Om8OCTmL24dUMC_L1quMe_ETbk,14
|
454
|
+
orionis-0.287.0.dist-info/zip-safe,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
|
455
|
+
orionis-0.287.0.dist-info/RECORD,,
|
tests/example/test_example.py
CHANGED
@@ -16,5 +16,8 @@ class TestExample(TestCase):
|
|
16
16
|
2 == 2 : bool
|
17
17
|
Ensures that the integer 2 is equal to itself.
|
18
18
|
"""
|
19
|
-
|
20
|
-
self.assertEqual(
|
19
|
+
# Check if 1 equals 1
|
20
|
+
self.assertEqual(1, 1)
|
21
|
+
|
22
|
+
# Check if 2 equals 2
|
23
|
+
self.assertEqual(2, 2)
|
@@ -5,14 +5,13 @@ from orionis.foundation.config.exceptions.integrity import OrionisIntegrityExcep
|
|
5
5
|
from orionis.unittesting import TestCase
|
6
6
|
|
7
7
|
class TestConfigApp(TestCase):
|
8
|
-
"""
|
9
|
-
Test cases for the App configuration class.
|
10
|
-
"""
|
11
8
|
|
12
9
|
async def testDefaultValues(self):
|
13
10
|
"""
|
14
11
|
Test that the App instance is created with the correct default values.
|
15
12
|
|
13
|
+
Notes
|
14
|
+
-----
|
16
15
|
Verifies that all default values match the expected defaults from the class definition.
|
17
16
|
"""
|
18
17
|
app = App()
|
@@ -32,6 +31,8 @@ class TestConfigApp(TestCase):
|
|
32
31
|
"""
|
33
32
|
Test that the environment attribute is properly validated and converted.
|
34
33
|
|
34
|
+
Notes
|
35
|
+
-----
|
35
36
|
Verifies that string environments are converted to enum values and invalid environments raise exceptions.
|
36
37
|
"""
|
37
38
|
# Test valid string environment
|
@@ -50,6 +51,8 @@ class TestConfigApp(TestCase):
|
|
50
51
|
"""
|
51
52
|
Test that the cipher attribute is properly validated and converted.
|
52
53
|
|
54
|
+
Notes
|
55
|
+
-----
|
53
56
|
Verifies that string ciphers are converted to enum values and invalid ciphers raise exceptions.
|
54
57
|
"""
|
55
58
|
# Test valid string cipher
|
@@ -68,6 +71,8 @@ class TestConfigApp(TestCase):
|
|
68
71
|
"""
|
69
72
|
Test that type validation works correctly for all attributes.
|
70
73
|
|
74
|
+
Notes
|
75
|
+
-----
|
71
76
|
Verifies that invalid types for each attribute raise OrionisIntegrityException.
|
72
77
|
"""
|
73
78
|
# Test invalid name type
|
@@ -98,6 +103,8 @@ class TestConfigApp(TestCase):
|
|
98
103
|
"""
|
99
104
|
Test that the toDict method returns a proper dictionary representation.
|
100
105
|
|
106
|
+
Notes
|
107
|
+
-----
|
101
108
|
Verifies that the returned dictionary contains all expected keys and values.
|
102
109
|
"""
|
103
110
|
app = App()
|
@@ -119,6 +126,9 @@ class TestConfigApp(TestCase):
|
|
119
126
|
async def testNonEmptyStringValidation(self):
|
120
127
|
"""
|
121
128
|
Test that empty strings are rejected for attributes requiring non-empty strings.
|
129
|
+
|
130
|
+
Notes
|
131
|
+
-----
|
122
132
|
Verifies that attributes requiring non-empty strings raise exceptions when empty strings are provided.
|
123
133
|
"""
|
124
134
|
with self.assertRaises(OrionisIntegrityException):
|
@@ -1,20 +1,25 @@
|
|
1
|
-
|
2
1
|
from orionis.foundation.config.auth.entities.auth import Auth
|
3
2
|
from orionis.unittesting import TestCase
|
4
3
|
|
5
4
|
class TestConfigApp(TestCase):
|
6
5
|
"""
|
7
6
|
Test suite for verifying the behavior of the Auth configuration within the application.
|
7
|
+
|
8
8
|
This class contains asynchronous test cases to ensure that the Auth object
|
9
9
|
correctly handles the assignment and retrieval of new attribute values.
|
10
10
|
"""
|
11
11
|
|
12
12
|
async def testNewValue(self):
|
13
13
|
"""
|
14
|
-
Test
|
14
|
+
Test assignment and retrieval of new attribute values in Auth.
|
15
|
+
|
16
|
+
This test creates a new Auth object and assigns values to new attributes.
|
17
|
+
It then asserts that these attributes hold the expected values.
|
15
18
|
|
16
|
-
|
17
|
-
|
19
|
+
Returns
|
20
|
+
-------
|
21
|
+
None
|
22
|
+
This method does not return a value.
|
18
23
|
"""
|
19
24
|
auth = Auth()
|
20
25
|
auth.new_value = 'new_value'
|
@@ -6,13 +6,23 @@ from orionis.foundation.config.cache.entities.stores import Stores
|
|
6
6
|
|
7
7
|
class TestConfigCache(TestCase):
|
8
8
|
"""
|
9
|
-
Test
|
9
|
+
Test suite for the Cache configuration entity.
|
10
|
+
|
11
|
+
This class contains asynchronous unit tests for the Cache entity,
|
12
|
+
validating default values, driver validation, type checking,
|
13
|
+
dictionary conversion, and Stores instance validation.
|
10
14
|
"""
|
11
15
|
|
12
16
|
async def testDefaultValues(self):
|
13
17
|
"""
|
14
18
|
Test that the Cache instance is created with the correct default values.
|
15
|
-
|
19
|
+
|
20
|
+
Ensures that the default values of the Cache instance match the expected
|
21
|
+
defaults from the class definition.
|
22
|
+
|
23
|
+
Returns
|
24
|
+
-------
|
25
|
+
None
|
16
26
|
"""
|
17
27
|
cache = Cache()
|
18
28
|
self.assertEqual(cache.default, Drivers.MEMORY.value)
|
@@ -20,22 +30,33 @@ class TestConfigCache(TestCase):
|
|
20
30
|
|
21
31
|
async def testDriverValidation(self):
|
22
32
|
"""
|
23
|
-
Test
|
24
|
-
|
33
|
+
Test validation and conversion of the default driver attribute.
|
34
|
+
|
35
|
+
Verifies that string drivers are converted to enum values and that
|
36
|
+
invalid drivers raise exceptions.
|
37
|
+
|
38
|
+
Returns
|
39
|
+
-------
|
40
|
+
None
|
25
41
|
"""
|
26
42
|
# Test valid string driver
|
27
43
|
cache = Cache(default="FILE")
|
28
44
|
self.assertEqual(cache.default, Drivers.FILE.value)
|
29
45
|
|
30
|
-
|
31
46
|
# Test invalid driver
|
32
47
|
with self.assertRaises(OrionisIntegrityException):
|
33
48
|
Cache(default="INVALID_DRIVER")
|
34
49
|
|
35
50
|
async def testDriverCaseInsensitivity(self):
|
36
51
|
"""
|
37
|
-
Test
|
38
|
-
|
52
|
+
Test case insensitivity of driver names provided as strings.
|
53
|
+
|
54
|
+
Ensures that different case variations of driver names are properly
|
55
|
+
normalized to the correct enum value.
|
56
|
+
|
57
|
+
Returns
|
58
|
+
-------
|
59
|
+
None
|
39
60
|
"""
|
40
61
|
# Test lowercase
|
41
62
|
cache = Cache(default="file")
|
@@ -51,8 +72,14 @@ class TestConfigCache(TestCase):
|
|
51
72
|
|
52
73
|
async def testTypeValidation(self):
|
53
74
|
"""
|
54
|
-
Test
|
55
|
-
|
75
|
+
Test type validation for all attributes.
|
76
|
+
|
77
|
+
Ensures that invalid types for each attribute raise
|
78
|
+
OrionisIntegrityException.
|
79
|
+
|
80
|
+
Returns
|
81
|
+
-------
|
82
|
+
None
|
56
83
|
"""
|
57
84
|
# Test invalid default type
|
58
85
|
with self.assertRaises(OrionisIntegrityException):
|
@@ -64,8 +91,14 @@ class TestConfigCache(TestCase):
|
|
64
91
|
|
65
92
|
async def testToDictMethod(self):
|
66
93
|
"""
|
67
|
-
Test
|
68
|
-
|
94
|
+
Test the toDict method for dictionary representation.
|
95
|
+
|
96
|
+
Ensures that the toDict method returns a dictionary containing all
|
97
|
+
expected keys and values.
|
98
|
+
|
99
|
+
Returns
|
100
|
+
-------
|
101
|
+
None
|
69
102
|
"""
|
70
103
|
cache = Cache()
|
71
104
|
cache_dict = cache.toDict()
|
@@ -76,8 +109,14 @@ class TestConfigCache(TestCase):
|
|
76
109
|
|
77
110
|
async def testStoresInstanceValidation(self):
|
78
111
|
"""
|
79
|
-
Test that stores attribute must be an instance of Stores
|
80
|
-
|
112
|
+
Test that the stores attribute must be an instance of Stores.
|
113
|
+
|
114
|
+
Ensures that only Stores instances are accepted for the stores
|
115
|
+
attribute and invalid types raise exceptions.
|
116
|
+
|
117
|
+
Returns
|
118
|
+
-------
|
119
|
+
None
|
81
120
|
"""
|
82
121
|
# Test with proper Stores instance
|
83
122
|
stores = Stores() # Assuming Stores has a default constructor
|
@@ -90,8 +129,14 @@ class TestConfigCache(TestCase):
|
|
90
129
|
|
91
130
|
async def testDriverEnumConversion(self):
|
92
131
|
"""
|
93
|
-
Test
|
94
|
-
|
132
|
+
Test conversion of Drivers enum values to string representations.
|
133
|
+
|
134
|
+
Ensures that enum members are converted to their value representations
|
135
|
+
when used as the default driver.
|
136
|
+
|
137
|
+
Returns
|
138
|
+
-------
|
139
|
+
None
|
95
140
|
"""
|
96
141
|
# Test with enum member
|
97
142
|
cache = Cache(default=Drivers.MEMORY)
|