Exemple #1
0
 def test_include_string(self):
     obj = InstallChecker()
     obj.engine = EngineEmul()
     obj.engine.config.get("modules")["base"] = EngineModule.__module__ + "." + EngineModule.__name__
     obj.engine.config.get("modules")["dummy"] = ModuleMock.__module__ + "." + ModuleMock.__name__
     obj.engine.config.get("modules")["err"] = "hello there"
     obj.settings["include"] = "base,dummy"
     self.assertRaises(NormalShutdown, obj.prepare)
Exemple #2
0
 def test_regular(self):
     obj = InstallChecker()
     obj.engine = EngineEmul()
     obj.engine.config.get("modules")[
         "base"] = EngineModule.__module__ + "." + EngineModule.__name__
     obj.engine.config.get("modules")[
         "dummy"] = ModuleMock.__module__ + "." + ModuleMock.__name__
     self.assertRaises(NormalShutdown, obj.prepare)
Exemple #3
0
 def test_include_string(self):
     obj = InstallChecker()
     obj.engine = EngineEmul()
     obj.engine.config.get("modules")["base"] = EngineModule.__module__ + "." + EngineModule.__name__
     obj.engine.config.get("modules")["dummy"] = ModuleMock.__module__ + "." + ModuleMock.__name__
     obj.engine.config.get("modules")["err"] = "hello there"
     obj.settings["include"] = "base,dummy"
     self.assertRaises(NormalShutdown, obj.prepare)
Exemple #4
0
 def test_problematic(self):
     obj = InstallChecker()
     obj.engine = EngineEmul()
     obj.engine.config.get("modules")["err"] = "hello there"
     self.assertRaises(ToolError, obj.prepare)
Exemple #5
0
 def test_exclude_problematic(self):
     obj = InstallChecker()
     obj.engine = EngineEmul()
     obj.engine.config.get("modules")["err"] = "hello there"
     obj.settings["exclude"] = ["err"]
     self.assertRaises(NormalShutdown, obj.prepare)
Exemple #6
0
 def test_problematic(self):
     obj = InstallChecker()
     obj.engine = EngineEmul()
     obj.engine.config.get("modules")["err"] = "hello there"
     self.assertRaises(ToolError, obj.prepare)
Exemple #7
0
 def test_regular(self):
     obj = InstallChecker()
     obj.engine = EngineEmul()
     obj.engine.config.get("modules")["base"] = EngineModule.__module__ + "." + EngineModule.__name__
     obj.engine.config.get("modules")["dummy"] = ModuleMock.__module__ + "." + ModuleMock.__name__
     self.assertRaises(NormalShutdown, obj.prepare)
Exemple #8
0
 def test_exclude_problematic(self):
     obj = InstallChecker()
     obj.engine = EngineEmul()
     obj.engine.config.get("modules")["err"] = "hello there"
     obj.settings["exclude"] = ["err"]
     self.assertRaises(NormalShutdown, obj.prepare)