Пример #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'])