コード例 #1
0
class TestStartServerTask(unittest.TestCase):
    def setUp(self):
        self.state = State()
        self.state.put(StaticVariables.SERVERNAME, "whe-rh563")
        self.state.put(StaticVariables.SERVERLOGIN, "root")
        self.state.put(StaticVariables.SERVERPASSWORD, "kramer5B")
        self.state.put(StaticVariables.SCREENLOGPATH, " build/screen ")
        self.state.put(StaticVariables.BUILDINSTALLPATH, "/build/9.5.0200.0057/DEBUG/BIN/Linux/bin")
        self.state.put(StaticVariables.COREDUMPPATH, "/build/9.5.0200.0057/DEBUG/BIN/Linux/")
        self.state.put(StaticVariables.OS, "Linux")

        self.testclass = StartServerTask()
        self.taskstatus = TaskStatus()

    def tearDown(self):
        pass

    def test_getClient(self):
        t = self.testclass.getClient(self.state)
        self.assertEqual(self.testclass.getClient(self.state), self.taskstatus.FAILED, "connect failed")
コード例 #2
0
    def setUp(self):
        self.state = State()
        self.state.put(StaticVariables.SERVERNAME, "whe-rh563")
        self.state.put(StaticVariables.SERVERLOGIN, "root")
        self.state.put(StaticVariables.SERVERPASSWORD, "kramer5B")
        self.state.put(StaticVariables.SCREENLOGPATH, " build/screen ")
        self.state.put(StaticVariables.BUILDINSTALLPATH, "/build/9.5.0200.0057/DEBUG/BIN/Linux/bin")
        self.state.put(StaticVariables.COREDUMPPATH, "/build/9.5.0200.0057/DEBUG/BIN/Linux/")
        self.state.put(StaticVariables.OS, "Linux")

        self.testclass = StartServerTask()
        self.taskstatus = TaskStatus()