Exemplo n.º 1
0
    def test_email(self):

        """Function:  test_email

        Description:  Test with email option.

        Arguments:

        """

        self.assertEqual(
            mongo_rep_admin._process_std(
                self.outdata, mail=self.mail, args_array=self.args_array2,
                suf=self.primary), self.status)
Exemplo n.º 2
0
    def test_file(self):

        """Function:  test_file

        Description:  Test with writing to file.

        Arguments:

        """

        self.assertEqual(
            mongo_rep_admin._process_std(
                self.outdata, ofile="Filename", args_array=self.args_array2,
                suf=self.primary), self.status)
Exemplo n.º 3
0
    def test_stdout_suppress(self):

        """Function:  test_stdout_suppress

        Description:  Test with standard out suppressed.

        Arguments:

        """

        self.assertEqual(
            mongo_rep_admin._process_std(
                self.outdata, args_array=self.args_array2, suf=self.primary),
            self.status)
Exemplo n.º 4
0
    def test_std_out(self):

        """Function:  test_std_out

        Description:  Test standard out format print.

        Arguments:

        """

        with gen_libs.no_std_out():
            self.assertEqual(
                mongo_rep_admin._process_std(
                    self.outdata, args_array=self.args_array,
                    suf=self.primary), self.status)
Exemplo n.º 5
0
    def test_mongo(self, mock_mongo):

        """Function:  test_mongo

        Description:  Test with writing to mongo.

        Arguments:

        """

        mock_mongo.return_value = self.conn

        self.assertEqual(
            mongo_rep_admin._process_std(
                self.outdata, class_cfg="mongocfg", db_tbl=self.db_tbl,
                args_array=self.args_array2, suf=self.primary), self.status)