def test_no_rep_info(self, mock_mst, mock_prt): """Function: test_no_rep_info Description: Test with no replication information. Arguments: """ mock_mst.return_value = self.get_master mock_prt.return_value = True self.assertEqual( mongo_rep_admin.chk_mem_rep_lag(self.rep_status2, json=True, args_array=self.args_array, optdt=self.optdt), self.status)
def test_json_stdout(self, mock_mst, mock_prt): """Function: test_json_stdout Description: Test with JSON format to standard out. Arguments: """ mock_mst.return_value = self.get_master mock_prt.return_value = True self.assertEqual( mongo_rep_admin.chk_mem_rep_lag(self.rep_status, json=True, args_array=self.args_array2, optdt=self.optdt), self.status)
def test_std_out_suppress(self, mock_mst): """Function: test_std_out_suppress Description: Test with standard out suppressed. Arguments: """ mock_mst.return_value = self.get_master self.assertEqual( mongo_rep_admin.chk_mem_rep_lag(self.rep_status, optdt=self.optdt, suf=self.primary, args_array=self.args_array), self.status)
def test_std_out_file(self, mock_mst): """Function: test_std_out_file Description: Test with standard out writing to file. Arguments: """ mock_mst.return_value = self.get_master self.assertEqual( mongo_rep_admin.chk_mem_rep_lag(self.rep_status, ofile="Filename", args_array=self.args_array, optdt=self.optdt, suf=self.primary), self.status)
def test_file(self, mock_mst, mock_file): """Function: test_file Description: Test with writing to file. Arguments: """ mock_mst.return_value = self.get_master mock_file.return_value = True self.assertEqual( mongo_rep_admin.chk_mem_rep_lag(self.rep_status, json=True, ofile="Filename", args_array=self.args_array, optdt=self.optdt), self.status)
def test_mongo(self, mock_mst, mock_mongo): """Function: test_mongo Description: Test with writing to mongo. Arguments: """ mock_mst.return_value = self.get_master mock_mongo.return_value = self.conn self.assertEqual( mongo_rep_admin.chk_mem_rep_lag(self.rep_status, json=True, class_cfg="mongocfg", db_tbl=self.db_tbl, args_array=self.args_array, optdt=self.optdt), self.status)
def test_std_out_mongo_success(self, mock_mst, mock_mongo): """Function: test_std_out_mongo_success Description: Test with successful connection to Mongo. Arguments: """ mock_mst.return_value = self.get_master mock_mongo.return_value = self.conn self.assertEqual( mongo_rep_admin.chk_mem_rep_lag(self.rep_status, class_cfg="mongocfg", db_tbl=self.db_tbl, args_array=self.args_array, optdt=self.optdt, suf=self.primary), self.status)