Exemplo n.º 1
0
 def test_load_without_app_files(self):
     config = load_config()
     expected = {
         'pre-restart': [],
         'post-restart': [],
     }
     self.assertDictEqual(config, expected)
Exemplo n.º 2
0
 def test_load_app_yml(self):
     with open("app.yml", "w") as f:
         f.write(self.data)
     config = load_config()
     expected = {
         'hooks': None,
         'pre-restart': ['testdata/pre.sh'],
         'post-restart': ['testdata/pos.sh'],
     }
     self.assertDictEqual(config, expected)
     os.remove("app.yml")
Exemplo n.º 3
0
 def test_load_app_yml(self):
     yml_file = os.path.join(self.working_dir, "app.yaml")
     with open(yml_file, "w") as f:
         f.write(self.data)
     config = load_config(watcher=self.watcher)
     expected = {
         'hooks': {
             'pre-restart': ['testdata/pre.sh'],
             'post-restart': ['testdata/pos.sh'],
         }
     }
     self.assertDictEqual(config, expected)
     os.remove(yml_file)
Exemplo n.º 4
0
 def test_load_without_app_files(self):
     config = load_config(watcher=self.watcher)
     expected = {}
     self.assertDictEqual(config, expected)