Ejemplo n.º 1
0
 def test_save_full_with_https(self):
     defaults = tutor_config.load_defaults()
     with tempfile.TemporaryDirectory() as root:
         config = tutor_config.load_current(root, defaults)
         tutor_config.merge(config, defaults)
         config["ACTIVATE_HTTPS"] = True
         with unittest.mock.patch.object(fmt, "STDOUT"):
             env.save(root, config)
             with open(os.path.join(root, "env", "apps", "nginx", "lms.conf")) as f:
                 self.assertIn("ssl", f.read())
Ejemplo n.º 2
0
 def test_save_full(self) -> None:
     defaults = tutor_config.load_defaults()
     with tempfile.TemporaryDirectory() as root:
         config = tutor_config.load_current(root, defaults)
         tutor_config.merge(config, defaults)
         with patch.object(fmt, "STDOUT"):
             env.save(root, config)
         self.assertTrue(
             os.path.exists(
                 os.path.join(root, "env", "local", "docker-compose.yml")))
Ejemplo n.º 3
0
 def test_save_full_with_https(self):
     defaults = tutor_config.load_defaults()
     with tempfile.TemporaryDirectory() as root:
         config = tutor_config.load_current(root, defaults)
         tutor_config.merge(config, defaults)
         config["ENABLE_HTTPS"] = True
         with unittest.mock.patch.object(fmt, "STDOUT"):
             env.save(root, config)
             with open(os.path.join(root, "env", "apps", "caddy", "Caddyfile")) as f:
                 self.assertIn("www.myopenedx.com {", f.read())