def test_stdout_suppress_json(self): """Function: test_stdout_suppress_json Description: Test with standard out being suppressed. Arguments: """ self.assertFalse(mysql_db_admin.status(self.server, self.args_array))
def test_non_json(self): """Function: test_non_json Description: Test with in non-JSON format. Arguments: """ with gen_libs.no_std_out(): self.assertFalse( mysql_db_admin.status(self.server, self.args_array2))
def test_stdout(self): """Function: test_stdout Description: Test with standard out. Arguments: """ with gen_libs.no_std_out(): self.assertFalse( mysql_db_admin.status(self.server, self.args_array3))
def test_flatten_json(self, mock_write, mock_mongo): """Function: test_flatten_json Description: Test with flatten option for JSON format. Arguments: """ mock_write.return_value = True mock_mongo.return_value = (True, None) self.assertFalse(mysql_db_admin.status(self.server, self.args_array5))
def test_mail_non_json(self): """Function: test_mail_non_json Description: Test with emailing out for non-json format. Arguments: """ self.assertFalse( mysql_db_admin.status(self.server, self.args_array6, mail=self.mail))
def test_mail(self, mock_write, mock_mongo): """Function: test_mail Description: Test with emailing out. Arguments: """ mock_write.return_value = True mock_mongo.return_value = (True, None) self.assertFalse( mysql_db_admin.status(self.server, self.args_array, mail=self.mail))
def test_file_non_json(self, mock_write): """Function: test_file_non_json Description: Test with writing to file for standard format. Arguments: """ mock_write.return_value = True self.assertFalse( mysql_db_admin.status(self.server, self.args_array6, ofile="FileName"))
def test_append_to_file(self, mock_write, mock_mongo): """Function: test_append_to_file Description: Test with appending to file. Arguments: """ mock_write.return_value = True mock_mongo.return_value = (True, None) self.assertFalse( mysql_db_admin.status(self.server, self.args_array4, ofile="FileName"))
def test_mongo(self, mock_write, mock_mongo): """Function: test_mongo Description: Test with mongo connection. Arguments: """ mock_write.return_value = True mock_mongo.return_value = (True, None) self.assertFalse( mysql_db_admin.status(self.server, self.args_array, class_cfg="Cfg", db_tbl="db:tbl"))
def test_mongo_fail(self, mock_write, mock_mongo): """Function: test_mongo_fail Description: Test with mongo connection. Arguments: """ mock_write.return_value = True mock_mongo.return_value = (False, "Error Message") with gen_libs.no_std_out(): self.assertFalse( mysql_db_admin.status(self.server, self.args_array, class_cfg="Cfg", db_tbl="db:tbl"))