Exemple #1
0
    def test_failure(self):
        subprocess.call = self.call_false

        success = irc_handler.start_irc_client()
        self.assertFalse(success)

        success = irc_handler.stop_irc_client()
        self.assertFalse(success)

        success = irc_handler.restart_irc_client()
        self.assertFalse(success)
Exemple #2
0
    def test_succes(self):
        subprocess.call = self.call_true

        success = irc_handler.start_irc_client()
        self.assertTrue(success)

        success = irc_handler.stop_irc_client()
        self.assertTrue(success)

        success = irc_handler.restart_irc_client()
        self.assertTrue(success)

        success = irc_handler.status_irc_client()
        self.assertTrue(success)