def test_rcpt_with_args_parse(self): rcpt = 'TO:<*****@*****.**> MAX=53' self.assertEqual(parse('rcpt', rcpt), ('<*****@*****.**>', ['MAX=53']))
def test_empty_parse(self): self.assertEqual(parse('help', ''), None)
def test_rcpt_parse(self): rcpt = 'TO:<*****@*****.**>' self.assertEqual(parse('rcpt', rcpt), ('<*****@*****.**>', [])) self.assertRaises(DenyError, parse, 'rcpt', 'TO:')
def test_mail_with_args_parse(self): mail = 'FROM:<*****@*****.**> SIZE=512' self.assertEqual(parse('mail', mail), ('<*****@*****.**>', ['SIZE=512']))
def test_mail_parse(self): mail = 'FROM:<*****@*****.**>' self.assertEqual(parse('mail', mail), ('<*****@*****.**>', [])) self.assertRaises(DenyError, parse, 'mail', 'FROM:')
def test_ehlo_parse(self): ehlo = 'local.localdomain' self.assertEqual(parse('ehlo', ehlo), ['local.localdomain'])
def test_helo_parse(self): helo = 'local.localdomain' self.assertEqual(parse('helo', helo), ['local.localdomain'])