orionis 0.286.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.
Files changed (57) hide show
  1. orionis/metadata/framework.py +1 -1
  2. orionis/services/environment/contracts/env.py +45 -50
  3. orionis/services/environment/dot_env.py +205 -181
  4. orionis/services/environment/env.py +68 -85
  5. orionis/services/environment/exceptions/environment_value_error.py +18 -0
  6. orionis/services/environment/exceptions/environment_value_exception.py +23 -0
  7. orionis/services/environment/type_hint.py +559 -0
  8. orionis/test/logs/history.py +3 -5
  9. {orionis-0.286.0.dist-info → orionis-0.287.0.dist-info}/METADATA +1 -1
  10. {orionis-0.286.0.dist-info → orionis-0.287.0.dist-info}/RECORD +56 -54
  11. tests/example/test_example.py +5 -2
  12. tests/foundation/config/app/test_app.py +13 -3
  13. tests/foundation/config/auth/test_auth.py +9 -4
  14. tests/foundation/config/cache/test_cache.py +60 -15
  15. tests/foundation/config/cache/test_cache_file.py +62 -14
  16. tests/foundation/config/cache/test_cache_stores.py +74 -14
  17. tests/foundation/config/cors/test_cors.py +102 -33
  18. tests/foundation/config/database/test_database.py +38 -14
  19. tests/foundation/config/database/test_database_connections.py +79 -5
  20. tests/foundation/config/database/test_database_mysql.py +138 -15
  21. tests/foundation/config/database/test_database_oracle.py +110 -26
  22. tests/foundation/config/database/test_database_pgsql.py +96 -26
  23. tests/foundation/config/database/test_database_sqlite.py +56 -2
  24. tests/foundation/config/exceptions/test_exceptions_integrity.py +44 -10
  25. tests/foundation/config/filesystems/test_filesystems.py +64 -14
  26. tests/foundation/config/filesystems/test_filesystems_aws.py +45 -7
  27. tests/foundation/config/filesystems/test_filesystems_disks.py +78 -8
  28. tests/foundation/config/filesystems/test_filesystems_local.py +66 -18
  29. tests/foundation/config/filesystems/test_filesystems_public.py +37 -0
  30. tests/foundation/config/logging/test_logging.py +75 -11
  31. tests/foundation/config/logging/test_logging_channels.py +79 -2
  32. tests/foundation/config/logging/test_logging_chunked.py +85 -12
  33. tests/foundation/config/logging/test_logging_daily.py +79 -12
  34. tests/foundation/config/logging/test_logging_hourly.py +68 -2
  35. tests/foundation/config/logging/test_logging_monthly.py +48 -2
  36. tests/foundation/config/logging/test_logging_stack.py +49 -14
  37. tests/foundation/config/logging/test_logging_weekly.py +92 -2
  38. tests/foundation/config/mail/test_mail.py +87 -15
  39. tests/foundation/config/mail/test_mail_file.py +40 -4
  40. tests/foundation/config/mail/test_mail_mailers.py +56 -8
  41. tests/foundation/config/mail/test_mail_smtp.py +58 -14
  42. tests/foundation/config/queue/test_queue.py +62 -9
  43. tests/foundation/config/queue/test_queue_brokers.py +27 -10
  44. tests/foundation/config/queue/test_queue_database.py +53 -15
  45. tests/foundation/config/root/test_root_paths.py +69 -2
  46. tests/foundation/config/session/test_session.py +30 -1
  47. tests/foundation/config/startup/test_config_startup.py +77 -7
  48. tests/foundation/config/testing/test_testing.py +68 -0
  49. tests/patterns/singleton/test_singleton.py +10 -1
  50. tests/services/environment/test_env.py +3 -4
  51. tests/testing/test_testing_result.py +56 -19
  52. tests/testing/test_testing_unit.py +93 -24
  53. orionis/services/environment/exceptions/value_exception.py +0 -27
  54. {orionis-0.286.0.dist-info → orionis-0.287.0.dist-info}/WHEEL +0 -0
  55. {orionis-0.286.0.dist-info → orionis-0.287.0.dist-info}/licenses/LICENCE +0 -0
  56. {orionis-0.286.0.dist-info → orionis-0.287.0.dist-info}/top_level.txt +0 -0
  57. {orionis-0.286.0.dist-info → orionis-0.287.0.dist-info}/zip-safe +0 -0
@@ -3,11 +3,23 @@ from orionis.foundation.config.exceptions.integrity import OrionisIntegrityExcep
3
3
  from orionis.unittesting import TestCase
4
4
 
5
5
  class TestSmtp(TestCase):
6
+ """
7
+ Unit tests for the Smtp configuration entity.
8
+
9
+ This test suite validates the default initialization, type validation,
10
+ attribute-specific validation, custom initialization, dictionary conversion,
11
+ and keyword-only enforcement for the Smtp class.
12
+ """
6
13
 
7
14
  async def testDefaultInitialization(self):
8
15
  """
9
- Test that Smtp instance is initialized with correct default values.
10
- Verifies all default values match the expected configuration.
16
+ Test default initialization of Smtp.
17
+
18
+ Ensures that an Smtp instance is initialized with the correct default values.
19
+
20
+ Returns
21
+ -------
22
+ None
11
23
  """
12
24
  smtp = Smtp()
13
25
  self.assertEqual(smtp.url, "smtp.mailtrap.io")
@@ -20,8 +32,14 @@ class TestSmtp(TestCase):
20
32
 
21
33
  async def testTypeValidation(self):
22
34
  """
23
- Test type validation for all Smtp attributes.
24
- Verifies that invalid types raise OrionisIntegrityException.
35
+ Test type validation for Smtp attributes.
36
+
37
+ Ensures that providing invalid types for Smtp attributes raises
38
+ OrionisIntegrityException.
39
+
40
+ Returns
41
+ -------
42
+ None
25
43
  """
26
44
  with self.assertRaises(OrionisIntegrityException):
27
45
  Smtp(url=123)
@@ -40,16 +58,26 @@ class TestSmtp(TestCase):
40
58
 
41
59
  async def testPortValidation(self):
42
60
  """
43
- Test specific validation for port attribute.
44
- Verifies that negative port numbers raise OrionisIntegrityException.
61
+ Test validation for the port attribute.
62
+
63
+ Ensures that negative port numbers raise OrionisIntegrityException.
64
+
65
+ Returns
66
+ -------
67
+ None
45
68
  """
46
69
  with self.assertRaises(OrionisIntegrityException):
47
70
  Smtp(port=-1)
48
71
 
49
72
  async def testTimeoutValidation(self):
50
73
  """
51
- Test specific validation for timeout attribute.
52
- Verifies that negative timeout values raise OrionisIntegrityException.
74
+ Test validation for the timeout attribute.
75
+
76
+ Ensures that negative timeout values raise OrionisIntegrityException.
77
+
78
+ Returns
79
+ -------
80
+ None
53
81
  """
54
82
  with self.assertRaises(OrionisIntegrityException):
55
83
  Smtp(timeout=-1)
@@ -57,7 +85,12 @@ class TestSmtp(TestCase):
57
85
  async def testValidCustomInitialization(self):
58
86
  """
59
87
  Test custom initialization with valid parameters.
60
- Verifies that valid custom values are accepted and stored correctly.
88
+
89
+ Ensures that valid custom values are accepted and stored correctly.
90
+
91
+ Returns
92
+ -------
93
+ None
61
94
  """
62
95
  custom_config = Smtp(
63
96
  url="smtp.example.com",
@@ -78,8 +111,14 @@ class TestSmtp(TestCase):
78
111
 
79
112
  async def testToDictMethod(self):
80
113
  """
81
- Test the toDict method returns proper dictionary representation.
82
- Verifies the method returns a dict containing all fields with correct values.
114
+ Test the toDict method of Smtp.
115
+
116
+ Ensures that the toDict method returns a dictionary containing all fields
117
+ with correct values.
118
+
119
+ Returns
120
+ -------
121
+ None
83
122
  """
84
123
  smtp = Smtp()
85
124
  result = smtp.toDict()
@@ -92,11 +131,16 @@ class TestSmtp(TestCase):
92
131
  self.assertEqual(result["password"], "")
93
132
  self.assertIsNone(result["timeout"])
94
133
 
95
-
96
134
  async def testKwOnlyInitialization(self):
97
135
  """
98
- Test that Smtp requires keyword arguments for initialization.
99
- Verifies the class enforces kw_only=True in its dataclass decorator.
136
+ Test keyword-only initialization enforcement.
137
+
138
+ Ensures that Smtp requires keyword arguments for initialization and
139
+ enforces kw_only=True in its dataclass decorator.
140
+
141
+ Returns
142
+ -------
143
+ None
100
144
  """
101
145
  with self.assertRaises(TypeError):
102
146
  Smtp("smtp.mailtrap.io", "smtp.mailtrap.io", 587, "TLS", "", "", None)
@@ -4,11 +4,24 @@ from orionis.foundation.config.exceptions.integrity import OrionisIntegrityExcep
4
4
  from orionis.unittesting import TestCase
5
5
 
6
6
  class TestQueue(TestCase):
7
+ """
8
+ Test suite for the Queue class.
9
+ """
7
10
 
8
11
  async def testDefaultInitialization(self):
9
12
  """
10
- Test that Queue instance is initialized with correct default values.
11
- Verifies that default connection is 'sync' and brokers is a Brokers instance.
13
+ Test default initialization of Queue.
14
+
15
+ Ensures that a Queue instance is initialized with the correct default values.
16
+
17
+ Returns
18
+ -------
19
+ None
20
+
21
+ Raises
22
+ ------
23
+ AssertionError
24
+ If the default value or brokers instance is incorrect.
12
25
  """
13
26
  queue = Queue()
14
27
  self.assertEqual(queue.default, "sync")
@@ -16,8 +29,18 @@ class TestQueue(TestCase):
16
29
 
17
30
  async def testDefaultValidation(self):
18
31
  """
19
- Test validation for default attribute.
20
- Verifies that invalid default values raise OrionisIntegrityException.
32
+ Test validation of the `default` attribute.
33
+
34
+ Checks that invalid values for the `default` attribute raise an OrionisIntegrityException.
35
+
36
+ Returns
37
+ -------
38
+ None
39
+
40
+ Raises
41
+ ------
42
+ OrionisIntegrityException
43
+ If an invalid default value is provided.
21
44
  """
22
45
  invalid_options = ["invalid", "", 123, None]
23
46
  for option in invalid_options:
@@ -26,8 +49,18 @@ class TestQueue(TestCase):
26
49
 
27
50
  async def testBrokersValidation(self):
28
51
  """
29
- Test validation for brokers attribute.
30
- Verifies that non-Brokers values raise OrionisIntegrityException.
52
+ Test validation of the `brokers` attribute.
53
+
54
+ Ensures that non-Brokers values for the `brokers` attribute raise an OrionisIntegrityException.
55
+
56
+ Returns
57
+ -------
58
+ None
59
+
60
+ Raises
61
+ ------
62
+ OrionisIntegrityException
63
+ If a non-Brokers value is provided for brokers.
31
64
  """
32
65
  with self.assertRaises(OrionisIntegrityException):
33
66
  Queue(brokers="invalid_brokers")
@@ -37,7 +70,17 @@ class TestQueue(TestCase):
37
70
  async def testValidCustomInitialization(self):
38
71
  """
39
72
  Test custom initialization with valid parameters.
40
- Verifies that valid default and Brokers instances are accepted.
73
+
74
+ Verifies that a Queue instance can be initialized with a valid default value and a Brokers instance.
75
+
76
+ Returns
77
+ -------
78
+ None
79
+
80
+ Raises
81
+ ------
82
+ AssertionError
83
+ If the custom initialization does not set the attributes correctly.
41
84
  """
42
85
  custom_brokers = Brokers(sync=False)
43
86
  queue = Queue(default="sync", brokers=custom_brokers)
@@ -47,8 +90,18 @@ class TestQueue(TestCase):
47
90
 
48
91
  async def testToDictMethod(self):
49
92
  """
50
- Test the toDict method returns proper dictionary representation.
51
- Verifies all fields are included with correct values.
93
+ Test the `toDict` method.
94
+
95
+ Ensures that the `toDict` method returns a dictionary representation of the Queue instance with all fields and correct values.
96
+
97
+ Returns
98
+ -------
99
+ None
100
+
101
+ Raises
102
+ ------
103
+ AssertionError
104
+ If the dictionary representation is incorrect.
52
105
  """
53
106
  queue = Queue()
54
107
  result = queue.toDict()
@@ -4,11 +4,13 @@ from orionis.foundation.config.exceptions.integrity import OrionisIntegrityExcep
4
4
  from orionis.unittesting import TestCase
5
5
 
6
6
  class TestBrokers(TestCase):
7
-
8
7
  async def testDefaultInitialization(self):
9
8
  """
10
9
  Test that Brokers instance is initialized with correct default values.
11
- Verifies that sync is True by default and database is a Database instance.
10
+
11
+ Notes
12
+ -----
13
+ Verifies that `sync` is `True` by default and `database` is a `Database` instance.
12
14
  """
13
15
  brokers = Brokers()
14
16
  self.assertTrue(brokers.sync)
@@ -16,8 +18,11 @@ class TestBrokers(TestCase):
16
18
 
17
19
  async def testSyncValidation(self):
18
20
  """
19
- Test validation for sync attribute.
20
- Verifies that non-boolean values raise OrionisIntegrityException.
21
+ Test validation for the `sync` attribute.
22
+
23
+ Notes
24
+ -----
25
+ Verifies that non-boolean values for `sync` raise `OrionisIntegrityException`.
21
26
  """
22
27
  with self.assertRaises(OrionisIntegrityException):
23
28
  Brokers(sync="true")
@@ -26,8 +31,11 @@ class TestBrokers(TestCase):
26
31
 
27
32
  async def testDatabaseValidation(self):
28
33
  """
29
- Test validation for database attribute.
30
- Verifies that non-Database values raise OrionisIntegrityException.
34
+ Test validation for the `database` attribute.
35
+
36
+ Notes
37
+ -----
38
+ Verifies that non-`Database` values for `database` raise `OrionisIntegrityException`.
31
39
  """
32
40
  with self.assertRaises(OrionisIntegrityException):
33
41
  Brokers(database="invalid_database")
@@ -37,7 +45,10 @@ class TestBrokers(TestCase):
37
45
  async def testCustomInitialization(self):
38
46
  """
39
47
  Test custom initialization with valid parameters.
40
- Verifies that valid boolean and Database instances are accepted.
48
+
49
+ Notes
50
+ -----
51
+ Verifies that valid boolean and `Database` instances are accepted for initialization.
41
52
  """
42
53
  custom_db = Database(table="custom_queue")
43
54
  brokers = Brokers(sync=False, database=custom_db)
@@ -47,8 +58,11 @@ class TestBrokers(TestCase):
47
58
 
48
59
  async def testToDictMethod(self):
49
60
  """
50
- Test the toDict method returns proper dictionary representation.
51
- Verifies all fields are included with correct values.
61
+ Test the `toDict` method returns proper dictionary representation.
62
+
63
+ Notes
64
+ -----
65
+ Verifies all fields are included with correct values in the returned dictionary.
52
66
  """
53
67
  brokers = Brokers()
54
68
  result = brokers.toDict()
@@ -61,7 +75,10 @@ class TestBrokers(TestCase):
61
75
  async def testKwOnlyInitialization(self):
62
76
  """
63
77
  Test that Brokers requires keyword arguments for initialization.
64
- Verifies the class enforces kw_only=True in its dataclass decorator.
78
+
79
+ Notes
80
+ -----
81
+ Verifies the class enforces `kw_only=True` in its dataclass decorator.
65
82
  """
66
83
  with self.assertRaises(TypeError):
67
84
  Brokers(True, Database())
@@ -4,11 +4,16 @@ from orionis.foundation.config.exceptions.integrity import OrionisIntegrityExcep
4
4
  from orionis.unittesting import TestCase
5
5
 
6
6
  class TestDatabaseQueue(TestCase):
7
-
8
7
  async def testDefaultInitialization(self):
9
8
  """
10
- Test that Database instance is initialized with correct default values.
11
- Verifies that default table name, queue name, retry_after, and strategy are set properly.
9
+ Test default initialization of Database.
10
+
11
+ Ensures that a Database instance is initialized with the correct default values for
12
+ table name, queue name, retry_after, and strategy.
13
+
14
+ Returns
15
+ -------
16
+ None
12
17
  """
13
18
  db_queue = Database()
14
19
  self.assertEqual(db_queue.table, "jobs")
@@ -18,8 +23,13 @@ class TestDatabaseQueue(TestCase):
18
23
 
19
24
  async def testTableNameValidation(self):
20
25
  """
21
- Test validation for table name attribute.
22
- Verifies that invalid table names raise OrionisIntegrityException.
26
+ Test validation of the table name attribute.
27
+
28
+ Checks that invalid table names raise an OrionisIntegrityException.
29
+
30
+ Returns
31
+ -------
32
+ None
23
33
  """
24
34
  with self.assertRaises(OrionisIntegrityException):
25
35
  Database(table="1jobs") # Starts with number
@@ -32,8 +42,13 @@ class TestDatabaseQueue(TestCase):
32
42
 
33
43
  async def testQueueNameValidation(self):
34
44
  """
35
- Test validation for queue name attribute.
36
- Verifies that non-ASCII queue names raise OrionisIntegrityException.
45
+ Test validation of the queue name attribute.
46
+
47
+ Checks that non-ASCII queue names and non-string values raise an OrionisIntegrityException.
48
+
49
+ Returns
50
+ -------
51
+ None
37
52
  """
38
53
  with self.assertRaises(OrionisIntegrityException):
39
54
  Database(queue="café") # Non-ASCII character
@@ -42,8 +57,13 @@ class TestDatabaseQueue(TestCase):
42
57
 
43
58
  async def testRetryAfterValidation(self):
44
59
  """
45
- Test validation for retry_after attribute.
46
- Verifies that non-positive integers raise OrionisIntegrityException.
60
+ Test validation of the retry_after attribute.
61
+
62
+ Ensures that non-positive integers and non-integer values raise an OrionisIntegrityException.
63
+
64
+ Returns
65
+ -------
66
+ None
47
67
  """
48
68
  with self.assertRaises(OrionisIntegrityException):
49
69
  Database(retry_after=0)
@@ -54,8 +74,14 @@ class TestDatabaseQueue(TestCase):
54
74
 
55
75
  async def testStrategyValidation(self):
56
76
  """
57
- Test validation and normalization for strategy attribute.
58
- Verifies both string and Strategy enum inputs are properly handled.
77
+ Test validation and normalization of the strategy attribute.
78
+
79
+ Verifies that both string and Strategy enum inputs are handled properly, and that
80
+ invalid inputs raise an OrionisIntegrityException.
81
+
82
+ Returns
83
+ -------
84
+ None
59
85
  """
60
86
  # Test string inputs (case-insensitive)
61
87
  db1 = Database(strategy="fifo")
@@ -75,8 +101,14 @@ class TestDatabaseQueue(TestCase):
75
101
 
76
102
  async def testToDictMethod(self):
77
103
  """
78
- Test the toDict method returns proper dictionary representation.
79
- Verifies all fields are included with correct values.
104
+ Test the toDict method.
105
+
106
+ Ensures that the toDict method returns a dictionary representation of the Database
107
+ instance with all fields included and correct values.
108
+
109
+ Returns
110
+ -------
111
+ None
80
112
  """
81
113
  db_queue = Database()
82
114
  result = db_queue.toDict()
@@ -88,8 +120,14 @@ class TestDatabaseQueue(TestCase):
88
120
 
89
121
  async def testKwOnlyInitialization(self):
90
122
  """
91
- Test that Database requires keyword arguments for initialization.
92
- Verifies the class enforces kw_only=True in its dataclass decorator.
123
+ Test keyword-only initialization enforcement.
124
+
125
+ Ensures that the Database class requires keyword arguments for initialization,
126
+ enforcing kw_only=True in its dataclass decorator.
127
+
128
+ Returns
129
+ -------
130
+ None
93
131
  """
94
132
  with self.assertRaises(TypeError):
95
133
  Database("jobs", "default", 90, Strategy.FIFO)
@@ -6,14 +6,41 @@ from orionis.unittesting import TestCase
6
6
  class TestPaths(TestCase):
7
7
  """
8
8
  Test suite for the Paths dataclass which defines the project directory structure.
9
- This test class verifies the integrity of path definitions, default values,
9
+
10
+ This class verifies the integrity of path definitions, default values,
10
11
  and the behavior of accessor methods.
12
+
13
+ Attributes
14
+ ----------
15
+ None
16
+
17
+ Methods
18
+ -------
19
+ testDefaultPathsInstantiation()
20
+ Test that a Paths instance can be created with default values.
21
+ testRequiredPathsAreSet()
22
+ Test that all required paths have non-empty default values.
23
+ testOptionalPathsCanBeEmpty()
24
+ Test that optional paths can be empty strings.
25
+ testPathValidationRejectsNonStringValues()
26
+ Test that non-string path values raise OrionisIntegrityException.
27
+ testPathValidationRejectsEmptyRequiredPaths()
28
+ Test that empty required paths raise OrionisIntegrityException.
29
+ testToDictReturnsCompleteDictionary()
30
+ Test that toDict() returns a complete dictionary of all paths.
31
+ testPathAccessorMethodsReturnPathObjects()
32
+ Test that all path accessor methods return Path objects.
33
+ testFrozenDataclassBehavior()
34
+ Test that the dataclass is truly frozen (immutable).
35
+ testPathMetadataIsAccessible()
36
+ Test that path metadata is properly defined and accessible.
11
37
  """
12
38
 
13
39
  def testDefaultPathsInstantiation(self):
14
40
  """
15
41
  Test that a Paths instance can be created with default values.
16
- Verifies that all default paths are correctly initialized and
42
+
43
+ Ensures that all default paths are correctly initialized and
17
44
  the instance is properly constructed.
18
45
  """
19
46
  paths = Paths()
@@ -22,6 +49,7 @@ class TestPaths(TestCase):
22
49
  def testRequiredPathsAreSet(self):
23
50
  """
24
51
  Test that all required paths have non-empty default values.
52
+
25
53
  Checks that paths marked as required in metadata are properly
26
54
  initialized with valid string values.
27
55
  """
@@ -39,8 +67,14 @@ class TestPaths(TestCase):
39
67
  def testOptionalPathsCanBeEmpty(self):
40
68
  """
41
69
  Test that optional paths can be empty strings.
70
+
42
71
  Verifies that paths not marked as required can be empty strings
43
72
  without raising exceptions.
73
+
74
+ Raises
75
+ ------
76
+ OrionisIntegrityException
77
+ If required validation fails.
44
78
  """
45
79
  with self.assertRaises(OrionisIntegrityException):
46
80
  Paths(
@@ -66,8 +100,14 @@ class TestPaths(TestCase):
66
100
  def testPathValidationRejectsNonStringValues(self):
67
101
  """
68
102
  Test that non-string path values raise OrionisIntegrityException.
103
+
69
104
  Verifies that the __post_init__ validation rejects non-string values
70
105
  for all path fields.
106
+
107
+ Raises
108
+ ------
109
+ OrionisIntegrityException
110
+ If a non-string value is provided.
71
111
  """
72
112
  with self.assertRaises(OrionisIntegrityException):
73
113
  Paths(console_scheduler=123)
@@ -75,7 +115,13 @@ class TestPaths(TestCase):
75
115
  def testPathValidationRejectsEmptyRequiredPaths(self):
76
116
  """
77
117
  Test that empty required paths raise OrionisIntegrityException.
118
+
78
119
  Verifies that required paths cannot be empty strings.
120
+
121
+ Raises
122
+ ------
123
+ OrionisIntegrityException
124
+ If a required path is empty.
79
125
  """
80
126
  with self.assertRaises(OrionisIntegrityException):
81
127
  Paths(console_scheduler='')
@@ -83,8 +129,13 @@ class TestPaths(TestCase):
83
129
  def testToDictReturnsCompleteDictionary(self):
84
130
  """
85
131
  Test that toDict() returns a complete dictionary of all paths.
132
+
86
133
  Verifies that the returned dictionary contains all path fields
87
134
  with their current values.
135
+
136
+ Returns
137
+ -------
138
+ None
88
139
  """
89
140
  paths = Paths()
90
141
  path_dict = paths.toDict()
@@ -96,7 +147,12 @@ class TestPaths(TestCase):
96
147
  def testPathAccessorMethodsReturnPathObjects(self):
97
148
  """
98
149
  Test that all path accessor methods return Path objects.
150
+
99
151
  Verifies that each get* method returns a proper pathlib.Path instance.
152
+
153
+ Returns
154
+ -------
155
+ None
100
156
  """
101
157
  paths = Paths()
102
158
  self.assertIsInstance(paths.getConsoleScheduler(), Path)
@@ -111,8 +167,14 @@ class TestPaths(TestCase):
111
167
  def testFrozenDataclassBehavior(self):
112
168
  """
113
169
  Test that the dataclass is truly frozen (immutable).
170
+
114
171
  Verifies that attempts to modify attributes after creation
115
172
  raise exceptions.
173
+
174
+ Raises
175
+ ------
176
+ Exception
177
+ If an attempt is made to modify a frozen dataclass.
116
178
  """
117
179
  paths = Paths()
118
180
  with self.assertRaises(Exception):
@@ -121,8 +183,13 @@ class TestPaths(TestCase):
121
183
  def testPathMetadataIsAccessible(self):
122
184
  """
123
185
  Test that path metadata is properly defined and accessible.
186
+
124
187
  Verifies that each path field has the expected metadata structure
125
188
  with description, type, and required fields.
189
+
190
+ Returns
191
+ -------
192
+ None
126
193
  """
127
194
  paths = Paths()
128
195
  for field in paths.__dataclass_fields__.values():
@@ -4,10 +4,12 @@ from orionis.foundation.config.exceptions.integrity import OrionisIntegrityExcep
4
4
  from orionis.unittesting import TestCase
5
5
 
6
6
  class TestSession(TestCase):
7
-
8
7
  async def testDefaultInitialization(self):
9
8
  """
10
9
  Test that Session instance is initialized with correct default values.
10
+
11
+ Notes
12
+ -----
11
13
  Verifies default values for all attributes including secret_key generation.
12
14
  """
13
15
  session = Session()
@@ -22,6 +24,9 @@ class TestSession(TestCase):
22
24
  async def testSecretKeyValidation(self):
23
25
  """
24
26
  Test validation for secret_key attribute.
27
+
28
+ Notes
29
+ -----
25
30
  Verifies that invalid secret keys raise OrionisIntegrityException.
26
31
  """
27
32
  with self.assertRaises(OrionisIntegrityException):
@@ -32,6 +37,9 @@ class TestSession(TestCase):
32
37
  async def testSessionCookieValidation(self):
33
38
  """
34
39
  Test validation for session_cookie attribute.
40
+
41
+ Notes
42
+ -----
35
43
  Verifies invalid cookie names raise OrionisIntegrityException.
36
44
  """
37
45
  with self.assertRaises(OrionisIntegrityException):
@@ -44,6 +52,9 @@ class TestSession(TestCase):
44
52
  async def testMaxAgeValidation(self):
45
53
  """
46
54
  Test validation for max_age attribute.
55
+
56
+ Notes
57
+ -----
47
58
  Verifies invalid max_age values raise OrionisIntegrityException.
48
59
  """
49
60
  with self.assertRaises(OrionisIntegrityException):
@@ -57,6 +68,9 @@ class TestSession(TestCase):
57
68
  async def testSameSiteValidation(self):
58
69
  """
59
70
  Test validation and normalization for same_site attribute.
71
+
72
+ Notes
73
+ -----
60
74
  Verifies both string and enum inputs are properly handled.
61
75
  """
62
76
  # Test string inputs (case-insensitive)
@@ -78,6 +92,9 @@ class TestSession(TestCase):
78
92
  async def testPathValidation(self):
79
93
  """
80
94
  Test validation for path attribute.
95
+
96
+ Notes
97
+ -----
81
98
  Verifies invalid paths raise OrionisIntegrityException.
82
99
  """
83
100
  with self.assertRaises(OrionisIntegrityException):
@@ -90,6 +107,9 @@ class TestSession(TestCase):
90
107
  async def testHttpsOnlyValidation(self):
91
108
  """
92
109
  Test validation for https_only attribute.
110
+
111
+ Notes
112
+ -----
93
113
  Verifies non-boolean values raise OrionisIntegrityException.
94
114
  """
95
115
  with self.assertRaises(OrionisIntegrityException):
@@ -100,6 +120,9 @@ class TestSession(TestCase):
100
120
  async def testDomainValidation(self):
101
121
  """
102
122
  Test validation for domain attribute.
123
+
124
+ Notes
125
+ -----
103
126
  Verifies invalid domains raise OrionisIntegrityException.
104
127
  """
105
128
  with self.assertRaises(OrionisIntegrityException):
@@ -116,6 +139,9 @@ class TestSession(TestCase):
116
139
  async def testToDictMethod(self):
117
140
  """
118
141
  Test the toDict method returns proper dictionary representation.
142
+
143
+ Notes
144
+ -----
119
145
  Verifies all fields are included with correct values.
120
146
  """
121
147
  session = Session()
@@ -132,6 +158,9 @@ class TestSession(TestCase):
132
158
  async def testKwOnlyInitialization(self):
133
159
  """
134
160
  Test that Session requires keyword arguments for initialization.
161
+
162
+ Notes
163
+ -----
135
164
  Verifies the class enforces kw_only=True in its dataclass decorator.
136
165
  """
137
166
  with self.assertRaises(TypeError):