def check(self, msg, results):
m = self.create_message(msg)<EOL>i = <NUM_LIT:0><EOL>for n, a in m.getaddrlist('<STR_LIT:to>') + m.getaddrlist('<STR_LIT>'):<EOL><INDENT>try:<EOL><INDENT>mn, ma = results[i][<NUM_LIT:0>], results[i][<NUM_LIT:1>]<EOL><DEDENT>except IndexError:<EOL><INDENT>print('<STR_LIT>', repr(n), repr(a))<EOL>continue<EOL><DEDENT>i = i + <NUM_LIT:1><EOL>self.assertEqual(mn, n,<EOL>"<STR_LIT>" % (mn, n))<EOL>self.assertEqual(ma, a,<EOL>"<STR_LIT>" % (ma, a))<EOL>if mn == n and ma == a:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>print('<STR_LIT>', repr(n), repr(a))<EOL><DEDENT><DEDENT>out = m.getdate('<STR_LIT:date>')<EOL>if out:<EOL><INDENT>self.assertEqual(out,<EOL>(<NUM_LIT>, <NUM_LIT:1>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT:0>),<EOL>"<STR_LIT>")<EOL><DEDENT>
Check addresses and the date.