def test_mail_std2(self): """Function: test_mail_std2 Description: Test with mail with standard format. Arguments: """ gen_libs.print_dict(self.data2, mail=self.mail, no_std=True) self.assertEqual(self.mail.msg, self.msg2)
def test_set_ofile(self): """Function: test_set_ofile Description: Test with ofile argument. Arguments: """ gen_libs.print_dict(self.data, ofile=self.ofile, no_std=True) self.assertTrue(os.path.isfile(self.ofile))
def test_mail_json2(self): """Function: test_mail_json2 Description: Test with mail with JSON format. Arguments: """ gen_libs.print_dict(self.data2, mail=self.mail, no_std=True, json_fmt=True) self.assertEqual(self.mail.msg, self.msg)
def test_set_json(self): """Function: test_set_json Description: Test with json_fmt argument. Arguments: """ gen_libs.print_dict(self.data, ofile=self.ofile, json_fmt=True, no_std=True) self.assertTrue(filecmp.cmp(self.basefile, self.ofile))
def test_mail_json(self): """Function: test_mail_json Description: Test with mail and json_fmt arguments. Arguments: """ gen_libs.print_dict(self.data2, mail=self.mail, json_fmt=True, no_std=True) self.assertEqual(self.mail.msg, self.msg)
def test_non_dict(self): """Function: test_non_dict Description: Test with non-dictionary object. Arguments: """ self.assertEqual(gen_libs.print_dict([1, 2, 3]), (True, "Error: [1, 2, 3] -> Is not a dictionary"))
def test_set_default(self): """Function: test_set_default Description: Test with default settings. Arguments: """ self.assertEqual(gen_libs.print_dict(self.data, no_std=True), (False, None))
def test_set_no_std(self): """Function: test_set_no_std Description: Test with no_std argument. Arguments: """ self.assertEqual(gen_libs.print_dict(self.data, no_std=True), (False, None))
def test_mail_std(self): """Function: test_mail_std Description: Test with mail with standard format. Arguments: """ self.assertEqual( gen_libs.print_dict(self.data, mail=self.mail, no_std=True), (False, None))
def test_set_ofile2(self): """Function: test_set_ofile2 Description: Test with ofile argument. Arguments: """ self.assertEqual( gen_libs.print_dict(self.data, ofile=self.ofile, no_std=True), (False, None))
def test_set_default(self, mock_prt, mock_std): """Function: test_set_default Description: Test with default settings. Arguments: """ mock_prt.return_value = True mock_std.return_value = True self.assertEqual(gen_libs.print_dict(self.data), (False, None))
def test_set_ofile(self, mock_prt, mock_std): """Function: test_set_ofile Description: Test with ofile argument. Arguments: """ mock_prt.return_value = True mock_std.return_value = True self.assertEqual(gen_libs.print_dict(self.data, ofile=self.ofile), (False, None))
def test_set_nostd(self, mock_prt, mock_std): """Function: test_set_nostd Description: Test with no_std argument. Arguments: """ mock_prt.return_value = True mock_std.return_value = True self.assertEqual(gen_libs.print_dict(self.data, no_std=self.no_std), (False, None))
def test_mail_json(self): """Function: test_mail_json Description: Test with mail with JSON format. Arguments: """ self.assertEqual( gen_libs.print_dict(self.data, mail=self.mail, no_std=True, json_fmt=True), (False, None))
def test_ofile_json2(self): """Function: test_ofile_json2 Description: Test with ofile and json_fmt arguments. Arguments: """ self.assertEqual( gen_libs.print_dict(self.data, ofile=self.ofile, json_fmt=True, no_std=True), (False, None))
def test_set_json(self, mock_prt, mock_std): """Function: test_set_json Description: Test with json_fmt argument. Arguments: """ mock_prt.return_value = True mock_std.return_value = True self.assertEqual( gen_libs.print_dict(self.data, json_fmt=self.json_fmt), (False, None))