21 lines
475 B
Python
21 lines
475 B
Python
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()
|