Files
cellxgene/server/test/test_app_config.py
bmccandless d457988810 Update for app config (#1369)
fixes an issue with "cellxgene launch" which had a bad interaction between
command line parameters and config file parameters.
Now, the config files are applied first, followed by the parameters that
were provided in the command line.

There is also now a check that each of the config attributes is type checked.
2020-04-08 15:44:56 -07:00

15 lines
476 B
Python

import unittest
from server.common.app_config import AppConfig
# NOTE, there are more tests that should be written for AppConfig.
# this is just a start.
class AppConfigTest(unittest.TestCase):
def test_update(self):
c = AppConfig()
c.update(server__verbose=True, multi_dataset__dataroot="datadir")
v = c.changes_from_default()
self.assertCountEqual(v, [("server__verbose", True, False), ("multi_dataset__dataroot", "datadir", None)]),