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
@@ -8,11 +8,54 @@ from orionis.unittesting import TestCase
8
8
  class TestConfigMySQL(TestCase):
9
9
  """
10
10
  Test cases for the MySQL database configuration class.
11
+
12
+ This class contains asynchronous unit tests for validating the behavior,
13
+ default values, and input validation of the `MySQL` configuration entity.
14
+
15
+ Attributes
16
+ ----------
17
+ None
18
+
19
+ Methods
20
+ -------
21
+ testDefaultValues()
22
+ Test that MySQL instance is created with correct default values.
23
+ testDriverValidation()
24
+ Test driver attribute validation.
25
+ testHostValidation()
26
+ Test host attribute validation.
27
+ testPortValidation()
28
+ Test port attribute validation.
29
+ testDatabaseValidation()
30
+ Test database attribute validation.
31
+ testUsernameValidation()
32
+ Test username attribute validation.
33
+ testPasswordValidation()
34
+ Test password attribute validation.
35
+ testUnixSocketValidation()
36
+ Test unix_socket attribute validation.
37
+ testCharsetValidation()
38
+ Test charset attribute validation.
39
+ testCollationValidation()
40
+ Test collation attribute validation.
41
+ testPrefixValidation()
42
+ Test prefix attribute validation.
43
+ testPrefixIndexesValidation()
44
+ Test prefix_indexes attribute validation.
45
+ testStrictValidation()
46
+ Test strict attribute validation.
47
+ testEngineValidation()
48
+ Test engine attribute validation.
49
+ testToDictMethod()
50
+ Test that toDict returns proper dictionary representation.
51
+ testCustomValues()
52
+ Test that custom values are properly stored and validated.
11
53
  """
12
54
 
13
55
  async def testDefaultValues(self):
14
56
  """
15
57
  Test that MySQL instance is created with correct default values.
58
+
16
59
  Verifies all default values match expected defaults from class definition.
17
60
  """
18
61
  mysql = MySQL()
@@ -33,7 +76,13 @@ class TestConfigMySQL(TestCase):
33
76
  async def testDriverValidation(self):
34
77
  """
35
78
  Test driver attribute validation.
36
- Verifies that only 'mysql' value is accepted for driver.
79
+
80
+ Ensures that only 'mysql' value is accepted for driver.
81
+
82
+ Raises
83
+ ------
84
+ OrionisIntegrityException
85
+ If the driver value is invalid.
37
86
  """
38
87
  with self.assertRaises(OrionisIntegrityException):
39
88
  MySQL(driver='')
@@ -45,7 +94,13 @@ class TestConfigMySQL(TestCase):
45
94
  async def testHostValidation(self):
46
95
  """
47
96
  Test host attribute validation.
48
- Verifies that empty or non-string hosts raise exceptions.
97
+
98
+ Ensures that empty or non-string hosts raise exceptions.
99
+
100
+ Raises
101
+ ------
102
+ OrionisIntegrityException
103
+ If the host value is invalid.
49
104
  """
50
105
  with self.assertRaises(OrionisIntegrityException):
51
106
  MySQL(host='')
@@ -55,7 +110,13 @@ class TestConfigMySQL(TestCase):
55
110
  async def testPortValidation(self):
56
111
  """
57
112
  Test port attribute validation.
58
- Verifies invalid port numbers raise exceptions.
113
+
114
+ Ensures invalid port numbers raise exceptions.
115
+
116
+ Raises
117
+ ------
118
+ OrionisIntegrityException
119
+ If the port value is invalid.
59
120
  """
60
121
  with self.assertRaises(OrionisIntegrityException):
61
122
  MySQL(port=0)
@@ -67,7 +128,13 @@ class TestConfigMySQL(TestCase):
67
128
  async def testDatabaseValidation(self):
68
129
  """
69
130
  Test database attribute validation.
70
- Verifies that empty or non-string database names raise exceptions.
131
+
132
+ Ensures that empty or non-string database names raise exceptions.
133
+
134
+ Raises
135
+ ------
136
+ OrionisIntegrityException
137
+ If the database value is invalid.
71
138
  """
72
139
  with self.assertRaises(OrionisIntegrityException):
73
140
  MySQL(database='')
@@ -77,7 +144,13 @@ class TestConfigMySQL(TestCase):
77
144
  async def testUsernameValidation(self):
78
145
  """
79
146
  Test username attribute validation.
80
- Verifies that empty or non-string usernames raise exceptions.
147
+
148
+ Ensures that empty or non-string usernames raise exceptions.
149
+
150
+ Raises
151
+ ------
152
+ OrionisIntegrityException
153
+ If the username value is invalid.
81
154
  """
82
155
  with self.assertRaises(OrionisIntegrityException):
83
156
  MySQL(username='')
@@ -87,7 +160,13 @@ class TestConfigMySQL(TestCase):
87
160
  async def testPasswordValidation(self):
88
161
  """
89
162
  Test password attribute validation.
90
- Verifies that non-string passwords raise exceptions.
163
+
164
+ Ensures that non-string passwords raise exceptions.
165
+
166
+ Raises
167
+ ------
168
+ OrionisIntegrityException
169
+ If the password value is invalid.
91
170
  """
92
171
  with self.assertRaises(OrionisIntegrityException):
93
172
  MySQL(password=123)
@@ -95,7 +174,13 @@ class TestConfigMySQL(TestCase):
95
174
  async def testUnixSocketValidation(self):
96
175
  """
97
176
  Test unix_socket attribute validation.
98
- Verifies that non-string socket paths raise exceptions.
177
+
178
+ Ensures that non-string socket paths raise exceptions.
179
+
180
+ Raises
181
+ ------
182
+ OrionisIntegrityException
183
+ If the unix_socket value is invalid.
99
184
  """
100
185
  with self.assertRaises(OrionisIntegrityException):
101
186
  MySQL(unix_socket=123)
@@ -103,7 +188,13 @@ class TestConfigMySQL(TestCase):
103
188
  async def testCharsetValidation(self):
104
189
  """
105
190
  Test charset attribute validation.
106
- Verifies enum conversion and invalid value handling.
191
+
192
+ Ensures enum conversion and invalid value handling.
193
+
194
+ Raises
195
+ ------
196
+ OrionisIntegrityException
197
+ If the charset value is invalid.
107
198
  """
108
199
  # Test string conversion
109
200
  mysql = MySQL(charset='UTF8')
@@ -119,7 +210,13 @@ class TestConfigMySQL(TestCase):
119
210
  async def testCollationValidation(self):
120
211
  """
121
212
  Test collation attribute validation.
122
- Verifies enum conversion and invalid value handling.
213
+
214
+ Ensures enum conversion and invalid value handling.
215
+
216
+ Raises
217
+ ------
218
+ OrionisIntegrityException
219
+ If the collation value is invalid.
123
220
  """
124
221
  # Test string conversion
125
222
  mysql = MySQL(collation='UTF8_GENERAL_CI')
@@ -135,7 +232,13 @@ class TestConfigMySQL(TestCase):
135
232
  async def testPrefixValidation(self):
136
233
  """
137
234
  Test prefix attribute validation.
138
- Verifies that non-string prefixes raise exceptions.
235
+
236
+ Ensures that non-string prefixes raise exceptions.
237
+
238
+ Raises
239
+ ------
240
+ OrionisIntegrityException
241
+ If the prefix value is invalid.
139
242
  """
140
243
  with self.assertRaises(OrionisIntegrityException):
141
244
  MySQL(prefix=123)
@@ -143,7 +246,13 @@ class TestConfigMySQL(TestCase):
143
246
  async def testPrefixIndexesValidation(self):
144
247
  """
145
248
  Test prefix_indexes attribute validation.
146
- Verifies that non-boolean values raise exceptions.
249
+
250
+ Ensures that non-boolean values raise exceptions.
251
+
252
+ Raises
253
+ ------
254
+ OrionisIntegrityException
255
+ If the prefix_indexes value is invalid.
147
256
  """
148
257
  with self.assertRaises(OrionisIntegrityException):
149
258
  MySQL(prefix_indexes='true')
@@ -153,7 +262,13 @@ class TestConfigMySQL(TestCase):
153
262
  async def testStrictValidation(self):
154
263
  """
155
264
  Test strict attribute validation.
156
- Verifies that non-boolean values raise exceptions.
265
+
266
+ Ensures that non-boolean values raise exceptions.
267
+
268
+ Raises
269
+ ------
270
+ OrionisIntegrityException
271
+ If the strict value is invalid.
157
272
  """
158
273
  with self.assertRaises(OrionisIntegrityException):
159
274
  MySQL(strict='true')
@@ -163,7 +278,13 @@ class TestConfigMySQL(TestCase):
163
278
  async def testEngineValidation(self):
164
279
  """
165
280
  Test engine attribute validation.
166
- Verifies enum conversion and invalid value handling.
281
+
282
+ Ensures enum conversion and invalid value handling.
283
+
284
+ Raises
285
+ ------
286
+ OrionisIntegrityException
287
+ If the engine value is invalid.
167
288
  """
168
289
  # Test string conversion
169
290
  mysql = MySQL(engine='MYISAM')
@@ -180,7 +301,8 @@ class TestConfigMySQL(TestCase):
180
301
  async def testToDictMethod(self):
181
302
  """
182
303
  Test that toDict returns proper dictionary representation.
183
- Verifies all attributes are correctly included in dictionary.
304
+
305
+ Ensures all attributes are correctly included in dictionary.
184
306
  """
185
307
  mysql = MySQL()
186
308
  mysql_dict = mysql.toDict()
@@ -201,7 +323,8 @@ class TestConfigMySQL(TestCase):
201
323
  async def testCustomValues(self):
202
324
  """
203
325
  Test that custom values are properly stored and validated.
204
- Verifies custom configuration values are correctly handled.
326
+
327
+ Ensures custom configuration values are correctly handled.
205
328
  """
206
329
  custom_mysql = MySQL(
207
330
  host='db.example.com',
@@ -7,12 +7,24 @@ from orionis.unittesting import TestCase
7
7
  class TestConfigOracle(TestCase):
8
8
  """
9
9
  Test cases for the Oracle database configuration class.
10
+
11
+ Notes
12
+ -----
13
+ This class contains asynchronous unit tests for the `Oracle` configuration entity,
14
+ validating its attributes, value constraints, and dictionary serialization.
10
15
  """
11
16
 
12
17
  async def testDefaultValues(self):
13
18
  """
14
- Test that Oracle instance is created with correct default values.
15
- Verifies all default values match expected defaults from class definition.
19
+ Test Oracle instance creation with default values.
20
+
21
+ Ensures that all default attribute values match the expected defaults
22
+ as defined in the class.
23
+
24
+ Raises
25
+ ------
26
+ AssertionError
27
+ If any default value does not match the expected value.
16
28
  """
17
29
  oracle = Oracle()
18
30
  self.assertEqual(oracle.driver, 'oracle')
@@ -29,8 +41,14 @@ class TestConfigOracle(TestCase):
29
41
 
30
42
  async def testDriverValidation(self):
31
43
  """
32
- Test driver attribute validation.
33
- Verifies that only 'oracle' value is accepted for driver.
44
+ Test validation of the `driver` attribute.
45
+
46
+ Ensures that only the value 'oracle' is accepted for the driver.
47
+
48
+ Raises
49
+ ------
50
+ OrionisIntegrityException
51
+ If the driver value is invalid.
34
52
  """
35
53
  with self.assertRaises(OrionisIntegrityException):
36
54
  Oracle(driver='')
@@ -41,8 +59,14 @@ class TestConfigOracle(TestCase):
41
59
 
42
60
  async def testUsernameValidation(self):
43
61
  """
44
- Test username attribute validation.
45
- Verifies that empty or non-string usernames raise exceptions.
62
+ Test validation of the `username` attribute.
63
+
64
+ Ensures that empty or non-string usernames raise exceptions.
65
+
66
+ Raises
67
+ ------
68
+ OrionisIntegrityException
69
+ If the username is invalid.
46
70
  """
47
71
  with self.assertRaises(OrionisIntegrityException):
48
72
  Oracle(username='')
@@ -51,16 +75,28 @@ class TestConfigOracle(TestCase):
51
75
 
52
76
  async def testPasswordValidation(self):
53
77
  """
54
- Test password attribute validation.
55
- Verifies that non-string passwords raise exceptions.
78
+ Test validation of the `password` attribute.
79
+
80
+ Ensures that non-string passwords raise exceptions.
81
+
82
+ Raises
83
+ ------
84
+ OrionisIntegrityException
85
+ If the password is invalid.
56
86
  """
57
87
  with self.assertRaises(OrionisIntegrityException):
58
88
  Oracle(password=123)
59
89
 
60
90
  async def testHostValidation(self):
61
91
  """
62
- Test host attribute validation when not using DSN/TNS.
63
- Verifies that empty or non-string hosts raise exceptions.
92
+ Test validation of the `host` attribute when not using DSN/TNS.
93
+
94
+ Ensures that empty or non-string hosts raise exceptions.
95
+
96
+ Raises
97
+ ------
98
+ OrionisIntegrityException
99
+ If the host is invalid.
64
100
  """
65
101
  with self.assertRaises(OrionisIntegrityException):
66
102
  Oracle(host='', dsn=None, tns_name=None)
@@ -69,8 +105,14 @@ class TestConfigOracle(TestCase):
69
105
 
70
106
  async def testPortValidation(self):
71
107
  """
72
- Test port attribute validation when not using DSN/TNS.
73
- Verifies invalid port numbers raise exceptions.
108
+ Test validation of the `port` attribute when not using DSN/TNS.
109
+
110
+ Ensures that invalid port numbers raise exceptions.
111
+
112
+ Raises
113
+ ------
114
+ OrionisIntegrityException
115
+ If the port is invalid.
74
116
  """
75
117
  with self.assertRaises(OrionisIntegrityException):
76
118
  Oracle(port=0, dsn=None, tns_name=None)
@@ -81,8 +123,14 @@ class TestConfigOracle(TestCase):
81
123
 
82
124
  async def testServiceNameAndSidValidation(self):
83
125
  """
84
- Test service_name and sid validation when not using DSN/TNS.
85
- Verifies at least one of service_name or sid is required.
126
+ Test validation of `service_name` and `sid` attributes when not using DSN/TNS.
127
+
128
+ Ensures that at least one of `service_name` or `sid` is required.
129
+
130
+ Raises
131
+ ------
132
+ OrionisIntegrityException
133
+ If both `service_name` and `sid` are missing.
86
134
  """
87
135
  # Test with neither service_name nor sid
88
136
  with self.assertRaises(OrionisIntegrityException):
@@ -102,8 +150,14 @@ class TestConfigOracle(TestCase):
102
150
 
103
151
  async def testDsnValidation(self):
104
152
  """
105
- Test dsn attribute validation.
106
- Verifies that dsn must be non-empty string or None.
153
+ Test validation of the `dsn` attribute.
154
+
155
+ Ensures that `dsn` must be a non-empty string or None.
156
+
157
+ Raises
158
+ ------
159
+ OrionisIntegrityException
160
+ If the dsn is invalid.
107
161
  """
108
162
  with self.assertRaises(OrionisIntegrityException):
109
163
  Oracle(dsn='')
@@ -114,8 +168,14 @@ class TestConfigOracle(TestCase):
114
168
 
115
169
  async def testTnsNameValidation(self):
116
170
  """
117
- Test tns_name attribute validation.
118
- Verifies that tns_name must be non-empty string or None.
171
+ Test validation of the `tns_name` attribute.
172
+
173
+ Ensures that `tns_name` must be a non-empty string or None.
174
+
175
+ Raises
176
+ ------
177
+ OrionisIntegrityException
178
+ If the tns_name is invalid.
119
179
  """
120
180
  with self.assertRaises(OrionisIntegrityException):
121
181
  Oracle(tns_name='')
@@ -126,8 +186,14 @@ class TestConfigOracle(TestCase):
126
186
 
127
187
  async def testEncodingValidation(self):
128
188
  """
129
- Test encoding attribute validation.
130
- Verifies enum conversion and invalid value handling.
189
+ Test validation of the `encoding` attribute.
190
+
191
+ Ensures correct enum conversion and invalid value handling.
192
+
193
+ Raises
194
+ ------
195
+ OrionisIntegrityException
196
+ If the encoding value is invalid.
131
197
  """
132
198
  # Test enum assignment
133
199
  oracle = Oracle(encoding=OracleEncoding.WE8ISO8859P1)
@@ -139,8 +205,14 @@ class TestConfigOracle(TestCase):
139
205
 
140
206
  async def testNencodingValidation(self):
141
207
  """
142
- Test nencoding attribute validation.
143
- Verifies enum conversion and invalid value handling.
208
+ Test validation of the `nencoding` attribute.
209
+
210
+ Ensures correct enum conversion and invalid value handling.
211
+
212
+ Raises
213
+ ------
214
+ OrionisIntegrityException
215
+ If the nencoding value is invalid.
144
216
  """
145
217
  # Test string conversion
146
218
  oracle = Oracle(nencoding='EE8MSWIN1250')
@@ -156,8 +228,14 @@ class TestConfigOracle(TestCase):
156
228
 
157
229
  async def testToDictMethod(self):
158
230
  """
159
- Test that toDict returns proper dictionary representation.
160
- Verifies all attributes are correctly included in dictionary.
231
+ Test the `toDict` method for dictionary representation.
232
+
233
+ Ensures that all attributes are correctly included in the dictionary.
234
+
235
+ Raises
236
+ ------
237
+ AssertionError
238
+ If any attribute is missing or incorrect in the dictionary.
161
239
  """
162
240
  oracle = Oracle()
163
241
  oracle_dict = oracle.toDict()
@@ -176,8 +254,14 @@ class TestConfigOracle(TestCase):
176
254
 
177
255
  async def testConnectionMethods(self):
178
256
  """
179
- Test that different connection methods are properly handled.
180
- Verifies that either DSN, TNS, or host/port/service/sid combinations work.
257
+ Test handling of different Oracle connection methods.
258
+
259
+ Ensures that DSN, TNS, or host/port/service/sid combinations are valid.
260
+
261
+ Raises
262
+ ------
263
+ OrionisIntegrityException
264
+ If a valid connection method raises an exception.
181
265
  """
182
266
  # Test DSN connection
183
267
  try:
@@ -7,12 +7,21 @@ from orionis.unittesting import TestCase
7
7
  class TestConfigPGSQL(TestCase):
8
8
  """
9
9
  Test cases for the PGSQL database configuration class.
10
+
11
+ This class contains asynchronous unit tests for validating the behavior,
12
+ default values, and integrity checks of the PGSQL configuration entity.
10
13
  """
11
14
 
12
15
  async def testDefaultValues(self):
13
16
  """
14
- Test that PGSQL instance is created with correct default values.
15
- Verifies all default values match expected defaults from class definition.
17
+ Test default values of PGSQL instance.
18
+
19
+ Ensures that a PGSQL instance is created with the correct default values
20
+ as defined in the class.
21
+
22
+ Returns
23
+ -------
24
+ None
16
25
  """
17
26
  pgsql = PGSQL()
18
27
  self.assertEqual(pgsql.driver, 'pgsql')
@@ -29,8 +38,13 @@ class TestConfigPGSQL(TestCase):
29
38
 
30
39
  async def testDriverValidation(self):
31
40
  """
32
- Test driver attribute validation.
33
- Verifies that empty or non-string drivers raise exceptions.
41
+ Test validation of the driver attribute.
42
+
43
+ Checks that empty or non-string driver values raise an exception.
44
+
45
+ Returns
46
+ -------
47
+ None
34
48
  """
35
49
  with self.assertRaises(OrionisIntegrityException):
36
50
  PGSQL(driver='')
@@ -39,8 +53,13 @@ class TestConfigPGSQL(TestCase):
39
53
 
40
54
  async def testHostValidation(self):
41
55
  """
42
- Test host attribute validation.
43
- Verifies that empty or non-string hosts raise exceptions.
56
+ Test validation of the host attribute.
57
+
58
+ Checks that empty or non-string host values raise an exception.
59
+
60
+ Returns
61
+ -------
62
+ None
44
63
  """
45
64
  with self.assertRaises(OrionisIntegrityException):
46
65
  PGSQL(host='')
@@ -49,8 +68,13 @@ class TestConfigPGSQL(TestCase):
49
68
 
50
69
  async def testPortValidation(self):
51
70
  """
52
- Test port attribute validation.
53
- Verifies that non-numeric string ports raise exceptions.
71
+ Test validation of the port attribute.
72
+
73
+ Checks that non-numeric string ports or non-string ports raise an exception.
74
+
75
+ Returns
76
+ -------
77
+ None
54
78
  """
55
79
  with self.assertRaises(OrionisIntegrityException):
56
80
  PGSQL(port='abc')
@@ -59,8 +83,13 @@ class TestConfigPGSQL(TestCase):
59
83
 
60
84
  async def testDatabaseValidation(self):
61
85
  """
62
- Test database attribute validation.
63
- Verifies that empty or non-string database names raise exceptions.
86
+ Test validation of the database attribute.
87
+
88
+ Checks that empty or non-string database names raise an exception.
89
+
90
+ Returns
91
+ -------
92
+ None
64
93
  """
65
94
  with self.assertRaises(OrionisIntegrityException):
66
95
  PGSQL(database='')
@@ -69,8 +98,13 @@ class TestConfigPGSQL(TestCase):
69
98
 
70
99
  async def testUsernameValidation(self):
71
100
  """
72
- Test username attribute validation.
73
- Verifies that empty or non-string usernames raise exceptions.
101
+ Test validation of the username attribute.
102
+
103
+ Checks that empty or non-string usernames raise an exception.
104
+
105
+ Returns
106
+ -------
107
+ None
74
108
  """
75
109
  with self.assertRaises(OrionisIntegrityException):
76
110
  PGSQL(username='')
@@ -79,16 +113,26 @@ class TestConfigPGSQL(TestCase):
79
113
 
80
114
  async def testPasswordValidation(self):
81
115
  """
82
- Test password attribute validation.
83
- Verifies that non-string passwords raise exceptions.
116
+ Test validation of the password attribute.
117
+
118
+ Checks that non-string passwords raise an exception.
119
+
120
+ Returns
121
+ -------
122
+ None
84
123
  """
85
124
  with self.assertRaises(OrionisIntegrityException):
86
125
  PGSQL(password=123)
87
126
 
88
127
  async def testCharsetValidation(self):
89
128
  """
90
- Test charset attribute validation.
91
- Verifies enum conversion and invalid value handling.
129
+ Test validation of the charset attribute.
130
+
131
+ Ensures correct enum conversion and handling of invalid values.
132
+
133
+ Returns
134
+ -------
135
+ None
92
136
  """
93
137
  # Test string conversion
94
138
  pgsql = PGSQL(charset='UTF8')
@@ -104,8 +148,13 @@ class TestConfigPGSQL(TestCase):
104
148
 
105
149
  async def testPrefixIndexesValidation(self):
106
150
  """
107
- Test prefix_indexes attribute validation.
108
- Verifies that non-boolean values raise exceptions.
151
+ Test validation of the prefix_indexes attribute.
152
+
153
+ Checks that non-boolean values raise an exception.
154
+
155
+ Returns
156
+ -------
157
+ None
109
158
  """
110
159
  with self.assertRaises(OrionisIntegrityException):
111
160
  PGSQL(prefix_indexes='true')
@@ -114,8 +163,13 @@ class TestConfigPGSQL(TestCase):
114
163
 
115
164
  async def testSearchPathValidation(self):
116
165
  """
117
- Test search_path attribute validation.
118
- Verifies that empty or non-string search paths raise exceptions.
166
+ Test validation of the search_path attribute.
167
+
168
+ Checks that empty or non-string search paths raise an exception.
169
+
170
+ Returns
171
+ -------
172
+ None
119
173
  """
120
174
  with self.assertRaises(OrionisIntegrityException):
121
175
  PGSQL(search_path='')
@@ -124,8 +178,13 @@ class TestConfigPGSQL(TestCase):
124
178
 
125
179
  async def testSSLModeValidation(self):
126
180
  """
127
- Test sslmode attribute validation.
128
- Verifies enum conversion and invalid value handling.
181
+ Test validation of the sslmode attribute.
182
+
183
+ Ensures correct enum conversion and handling of invalid values.
184
+
185
+ Returns
186
+ -------
187
+ None
129
188
  """
130
189
  # Test string conversion
131
190
  pgsql = PGSQL(sslmode='REQUIRE')
@@ -141,8 +200,14 @@ class TestConfigPGSQL(TestCase):
141
200
 
142
201
  async def testToDictMethod(self):
143
202
  """
144
- Test that toDict returns proper dictionary representation.
145
- Verifies all attributes are correctly included in dictionary.
203
+ Test the toDict method of PGSQL.
204
+
205
+ Ensures that the dictionary representation contains all attributes
206
+ with correct values.
207
+
208
+ Returns
209
+ -------
210
+ None
146
211
  """
147
212
  pgsql = PGSQL()
148
213
  pgsql_dict = pgsql.toDict()
@@ -160,8 +225,13 @@ class TestConfigPGSQL(TestCase):
160
225
 
161
226
  async def testCustomValues(self):
162
227
  """
163
- Test that custom values are properly stored and validated.
164
- Verifies custom configuration values are correctly handled.
228
+ Test custom configuration values for PGSQL.
229
+
230
+ Ensures that custom values are properly stored and validated.
231
+
232
+ Returns
233
+ -------
234
+ None
165
235
  """
166
236
  custom_pgsql = PGSQL(
167
237
  host='db.example.com',