Add lightweight unittest coverage for stability fixes
This commit is contained in:
20
tests/test_config_check.py
Normal file
20
tests/test_config_check.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import unittest
|
||||
|
||||
from services.config_check import validate_cfg
|
||||
|
||||
|
||||
class ConfigCheckTests(unittest.TestCase):
|
||||
def test_admin_ids_without_admin_id_is_valid(self):
|
||||
cfg = {
|
||||
"telegram": {
|
||||
"token": "x",
|
||||
"admin_ids": [1, 2],
|
||||
}
|
||||
}
|
||||
errors, warnings = validate_cfg(cfg)
|
||||
self.assertEqual(errors, [])
|
||||
self.assertIsInstance(warnings, list)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user