Exemplo n.º 1
0
    def test_fetch_binlog(self, mock_sub, mock_fetch):
        """Function:  test_fetch_binlog

        Description:  Test with only default arguments passed.

        Arguments:

        """

        mock_sub.return_value = Popen()
        mock_fetch.return_value = self.binlog_files

        dataout = mysql_log_admin.fetch_binlog(self.server)

        self.assertEqual([x for x in dataout], self.filehandler)
Exemplo n.º 2
0
    def test_binpath(self, mock_sub, mock_fetch):
        """Function:  test_binpath

        Description:  Test with bin_path argument passed.

        Arguments:

        """

        mock_sub.return_value = Popen()
        mock_fetch.return_value = self.binlog_files

        dataout = mysql_log_admin.fetch_binlog(self.server, bin_path="./")

        self.assertEqual([x for x in dataout], self.filehandler)