'Check addresses and the date.'

def check(self, msg, results):

    m = self.create_message(msg)
    i = 0
    for (n, a) in (m.getaddrlist('to') + m.getaddrlist('cc')):
        try:
            (mn, ma) = (results[i][0], results[i][1])
        except IndexError:
            print 'extra    parsed    address:', repr(n), repr(a)
            continue
        i = (i + 1)
        self.assertEqual(mn, n, ('Un-expected    name:    %r    !=    %r' % (mn, n)))
        self.assertEqual(ma, a, ('Un-expected    address:    %r    !=    %r' % (ma, a)))
        if ((mn == n) and (ma == a)):
            pass
        else:
            print 'not    found:', repr(n), repr(a)
    out = m.getdate('date')
    if out:
        self.assertEqual(out, (1999, 1, 13, 23, 57, 35, 0, 1, 0), 'date    conversion    failed')
