コード例 #1
0
    def test_get_wait_up_single_process(self):
        global_config.global_config.get_config_value.expect_call(
            "HOSTS", "wait_up_processes", default="").and_return("proc1")

        host = base_classes.Host()
        self.assertEquals(host.get_wait_up_processes(), set(["proc1"]))
        self.god.check_playback()
コード例 #2
0
 def test_install(self):
     host = base_classes.Host()
     # create a dummy installable class
     class installable(object):
         def install(self, host):
             pass
     installableObj = self.god.create_mock_class(installable,
                                                 "installableObj")
     installableObj.install.expect_call(host)
     # run the actual test
     host.install(installableObj)
     self.god.check_playback()