Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 4
0
 def test_problematic(self):
     obj = InstallChecker()
     obj.engine = EngineEmul()
     obj.engine.config.get("modules")["err"] = "hello there"
     self.assertRaises(ToolError, obj.prepare)
Esempio n. 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)
Esempio n. 6
0
 def test_problematic(self):
     obj = InstallChecker()
     obj.engine = EngineEmul()
     obj.engine.config.get("modules")["err"] = "hello there"
     self.assertRaises(ToolError, obj.prepare)
Esempio n. 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)
Esempio n. 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)