예제 #1
0
 def test_rcpt_with_args_parse(self):
     rcpt = 'TO:<*****@*****.**> MAX=53'
     self.assertEqual(parse('rcpt', rcpt), ('<*****@*****.**>', ['MAX=53']))
예제 #2
0
 def test_empty_parse(self):
     self.assertEqual(parse('help', ''), None)
예제 #3
0
 def test_rcpt_parse(self):
     rcpt = 'TO:<*****@*****.**>'
     self.assertEqual(parse('rcpt', rcpt), ('<*****@*****.**>', []))
     self.assertRaises(DenyError, parse, 'rcpt', 'TO:')
예제 #4
0
 def test_mail_with_args_parse(self):
     mail = 'FROM:<*****@*****.**> SIZE=512'
     self.assertEqual(parse('mail', mail), ('<*****@*****.**>', ['SIZE=512']))
예제 #5
0
    def test_mail_parse(self):
        mail = 'FROM:<*****@*****.**>'
        self.assertEqual(parse('mail', mail), ('<*****@*****.**>', []))

        self.assertRaises(DenyError, parse, 'mail', 'FROM:')
예제 #6
0
 def test_ehlo_parse(self):
     ehlo = 'local.localdomain'
     self.assertEqual(parse('ehlo', ehlo), ['local.localdomain'])
예제 #7
0
 def test_helo_parse(self):
     helo = 'local.localdomain'
     self.assertEqual(parse('helo', helo), ['local.localdomain'])