18 lines
510 B
Python
18 lines
510 B
Python
from pathlib import Path
|
|
import unittest
|
|
|
|
|
|
TEMPLATE = Path(__file__).resolve().parents[1] / "docker/tinode/config.template"
|
|
|
|
|
|
class TinodeConfigTemplateTest(unittest.TestCase):
|
|
def test_admin_internal_api_enabled_comes_from_environment(self):
|
|
template = TEMPLATE.read_text(encoding="utf-8")
|
|
section = template.split('"admin_internal_api": {', 1)[1].split("},", 1)[0]
|
|
|
|
self.assertIn('"enabled": $ADMIN_INTERNAL_API_ENABLED', section)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main()
|