Exemplo n.º 1
0
 def test_handle_command_quit_reading_state(self):
     m = MailState()
     handle_command("QUIT", m)
     self.assertEqual(m.reading, False)
Exemplo n.º 2
0
 def test_handle_command_helo_reading_state(self):
     m = MailState()
     handle_command("HELO", m)
     self.assertEqual(m.reading, False)
Exemplo n.º 3
0
 def test_handle_command_rcpt_to_response(self):
     m = MailState()
     r = handle_command("RCPT TO", m)
     self.assertEqual(self.ok_done[0], r[0])
Exemplo n.º 4
0
 def test_handle_command_vrfy_reading_state(self):
     m = MailState()
     handle_command("VRFY", m)
     self.assertEqual(m.reading, False)
Exemplo n.º 5
0
 def test_handle_command_ehlo_connection_close_1024(self):
     m = MailState()
     r = handle_command("EHLO", m)
     self.assertEqual(self.ehlo[1], r[1])
Exemplo n.º 6
0
 def test_handle_command_unknown_command_response(self):
     m = MailState()
     r = handle_command("KURA", m)
     self.assertEqual(self.unknown[0], r[0])
Exemplo n.º 7
0
 def test_handle_command_starttls_connection_close(self):
     m = MailState()
     r = handle_command("STARTTLS", m)
     self.assertEqual(self.ok[1], r[1])
Exemplo n.º 8
0
 def test_handle_command_unknown_command_reading_state(self):
     m = MailState()
     handle_command("KURA", m)
     self.assertEqual(m.reading, False)
Exemplo n.º 9
0
 def test_handle_command_starttls_response(self):
     m = MailState()
     r = handle_command("STARTTLS", m)
     self.assertEqual(self.ok[0], r[0])
Exemplo n.º 10
0
 def test_handle_command_unknown_command_response(self):
     m = MailState()
     r = handle_command("KURA", m)
     self.assertEqual(self.unknown[0], r[0])
Exemplo n.º 11
0
 def test_handle_command_unknown_command_connection_close(self):
     m = MailState()
     r = handle_command("KURA", m)
     self.assertEqual(self.unknown[1], r[1])
Exemplo n.º 12
0
 def test_handle_command_data_reading_state(self):
     m = MailState()
     handle_command("DATA", m)
     self.assertEqual(m.reading, True)
Exemplo n.º 13
0
 def test_handle_command_data_connection_close(self):
     m = MailState()
     r = handle_command("DATA", m)
     self.assertEqual(self.data[1], r[1])
Exemplo n.º 14
0
 def test_handle_command_data_response(self):
     m = MailState()
     r = handle_command("DATA", m)
     self.assertEqual(self.data[0], r[0])
Exemplo n.º 15
0
 def test_handle_command_quit_reading_state(self):
     m = MailState()
     handle_command("QUIT", m)
     self.assertEqual(m.reading, False)
Exemplo n.º 16
0
 def test_handle_command_starttls_connection_close(self):
     m = MailState()
     r = handle_command("STARTTLS", m)
     self.assertEqual(self.ok[1], r[1])
Exemplo n.º 17
0
 def test_handle_command_data_connection_close(self):
     m = MailState()
     r = handle_command("DATA", m)
     self.assertEqual(self.data[1], r[1])
Exemplo n.º 18
0
 def test_handle_command_starttls_reading_state(self):
     m = MailState()
     handle_command("STARTTLS", m)
     self.assertEqual(m.reading, False)
Exemplo n.º 19
0
 def test_handle_command_unknown_command_reading_state(self):
     m = MailState()
     handle_command("KURA", m)
     self.assertEqual(m.reading, False)
Exemplo n.º 20
0
 def test_handle_command_vrfy_response(self):
     m = MailState()
     r = handle_command("VRFY", m)
     self.assertEqual(self.vrfy[0], r[0])
Exemplo n.º 21
0
 def test_handle_command_vrfy_response(self):
     m = MailState()
     r = handle_command("VRFY", m)
     self.assertEqual(self.vrfy[0], r[0])
Exemplo n.º 22
0
 def test_handle_command_vrfy_connection_close(self):
     m = MailState()
     r = handle_command("VRFY", m)
     self.assertEqual(self.vrfy[1], r[1])
Exemplo n.º 23
0
 def test_handle_command_data_after_data_command_connection_close(self):
     m = MailState()
     r = handle_command("VRFY", m)
     self.assertEqual(False, r[1])
Exemplo n.º 24
0
 def test_handle_command_vrfy_reading_state(self):
     m = MailState()
     handle_command("VRFY", m)
     self.assertEqual(m.reading, False)
Exemplo n.º 25
0
 def test_handle_command_helo_response(self):
     m = MailState()
     r = handle_command("HELO", m)
     self.assertEqual(self.ok_done[0], r[0])
Exemplo n.º 26
0
 def test_handle_command_data_after_data_command_response(self):
     m = MailState()
     m.reading = True
     r = handle_command("Kura Kura Kura", m)
     self.assertEqual(None, r[0])
Exemplo n.º 27
0
 def test_handle_command_mail_from_connection_close(self):
     m = MailState()
     r = handle_command("MAIL FROM", m)
     self.assertEqual(self.ok_done[1], r[1])
Exemplo n.º 28
0
 def test_handle_command_data_after_data_command_connection_close(self):
     m = MailState()
     r = handle_command("VRFY", m)
     self.assertEqual(False, r[1])
Exemplo n.º 29
0
 def test_handle_command_rcpt_to_reading_state(self):
     m = MailState()
     handle_command("RCPT TO", m)
     self.assertEqual(m.reading, False)
Exemplo n.º 30
0
 def test_handle_command_ehlo_response_1024(self):
     m = MailState()
     r = handle_command("EHLO", m)
     self.assertEqual(self.ehlo[0], r[0])
Exemplo n.º 31
0
 def test_handle_command_quit_connection_close(self):
     m = MailState()
     r = handle_command("QUIT", m)
     self.assertEqual(self.quit[1], r[1])
Exemplo n.º 32
0
 def test_handle_command_ehlo_connection_close_1024(self):
     m = MailState()
     r = handle_command("EHLO", m)
     self.assertEqual(self.ehlo[1], r[1])
Exemplo n.º 33
0
 def test_handle_command_data_response(self):
     m = MailState()
     r = handle_command("DATA", m)
     self.assertEqual(self.data[0], r[0])
Exemplo n.º 34
0
 def test_handle_command_ehlo_reading_state_1024(self):
     m = MailState()
     handle_command("EHLO", m)
     self.assertEqual(m.reading, False)
Exemplo n.º 35
0
 def test_handle_command_data_reading_state(self):
     m = MailState()
     handle_command("DATA", m)
     self.assertEqual(m.reading, True)
Exemplo n.º 36
0
 def test_handle_command_helo_response(self):
     m = MailState()
     r = handle_command("HELO", m)
     self.assertEqual(self.ok_done[0], r[0])
Exemplo n.º 37
0
 def test_handle_command_unknown_command_connection_close(self):
     m = MailState()
     r = handle_command("KURA", m)
     self.assertEqual(self.unknown[1], r[1])
Exemplo n.º 38
0
 def test_handle_command_helo_connection_close(self):
     m = MailState()
     r = handle_command("HELO", m)
     self.assertEqual(self.ok_done[1], r[1])
Exemplo n.º 39
0
 def test_handle_command_starttls_response(self):
     m = MailState()
     r = handle_command("STARTTLS", m)
     self.assertEqual(self.ok[0], r[0])
Exemplo n.º 40
0
 def test_handle_command_helo_reading_state(self):
     m = MailState()
     handle_command("HELO", m)
     self.assertEqual(m.reading, False)
Exemplo n.º 41
0
 def test_handle_command_starttls_reading_state(self):
     m = MailState()
     handle_command("STARTTLS", m)
     self.assertEqual(m.reading, False)
Exemplo n.º 42
0
 def test_handle_command_mail_from_response(self):
     m = MailState()
     r = handle_command("MAIL FROM", m)
     self.assertEqual(self.ok_done[0], r[0])
Exemplo n.º 43
0
 def test_handle_command_vrfy_connection_close(self):
     m = MailState()
     r = handle_command("VRFY", m)
     self.assertEqual(self.vrfy[1], r[1])
Exemplo n.º 44
0
 def test_handle_command_mail_from_connection_close(self):
     m = MailState()
     r = handle_command("MAIL FROM", m)
     self.assertEqual(self.ok_done[1], r[1])
Exemplo n.º 45
0
 def test_handle_command_data_after_data_command_response(self):
     m = MailState()
     m.reading = True
     r = handle_command("Kura Kura Kura", m)
     self.assertEqual(None, r[0])
Exemplo n.º 46
0
 def test_handle_command_mail_from_reading_state(self):
     m = MailState()
     handle_command("MAIL FROM", m)
     self.assertEqual(m.reading, False)
Exemplo n.º 47
0
 def test_handle_command_ehlo_response_1024(self):
     m = MailState()
     r = handle_command("EHLO", m)
     self.assertEqual(self.ehlo[0], r[0])
Exemplo n.º 48
0
 def test_handle_command_rcpt_to_response(self):
     m = MailState()
     r = handle_command("RCPT TO", m)
     self.assertEqual(self.ok_done[0], r[0])
Exemplo n.º 49
0
 def test_handle_command_ehlo_reading_state_1024(self):
     m = MailState()
     handle_command("EHLO", m)
     self.assertEqual(m.reading, False)
Exemplo n.º 50
0
 def test_handle_command_rcpt_to_connection_close(self):
     m = MailState()
     r = handle_command("RCPT TO", m)
     self.assertEqual(self.ok_done[1], r[1])
Exemplo n.º 51
0
 def test_handle_command_helo_connection_close(self):
     m = MailState()
     r = handle_command("HELO", m)
     self.assertEqual(self.ok_done[1], r[1])
Exemplo n.º 52
0
 def test_handle_command_rcpt_to_reading_state(self):
     m = MailState()
     handle_command("RCPT TO", m)
     self.assertEqual(m.reading, False)
Exemplo n.º 53
0
 def test_handle_command_mail_from_response(self):
     m = MailState()
     r = handle_command("MAIL FROM", m)
     self.assertEqual(self.ok_done[0], r[0])
Exemplo n.º 54
0
 def test_handle_command_rset_response(self):
     m = MailState()
     r = handle_command("RSET", m)
     self.assertEqual(self.ok_done[0], r[0])
Exemplo n.º 55
0
 def test_handle_command_mail_from_reading_state(self):
     m = MailState()
     handle_command("MAIL FROM", m)
     self.assertEqual(m.reading, False)
Exemplo n.º 56
0
 def test_handle_command_rset_connection_close(self):
     m = MailState()
     r = handle_command("RSET", m)
     self.assertEqual(self.ok_done[1], r[1])
Exemplo n.º 57
0
 def test_handle_command_rcpt_to_connection_close(self):
     m = MailState()
     r = handle_command("RCPT TO", m)
     self.assertEqual(self.ok_done[1], r[1])
Exemplo n.º 58
0
 def test_handle_command_quit_response(self):
     m = MailState()
     r = handle_command("QUIT", m)
     self.assertEqual(self.quit[0], r[0])
Exemplo n.º 59
0
 def test_handle_command_rset_response(self):
     m = MailState()
     r = handle_command("RSET", m)
     self.assertEqual(self.ok_done[0], r[0])
Exemplo n.º 60
0
 def test_handle_command_quit_connection_close(self):
     m = MailState()
     r = handle_command("QUIT", m)
     self.assertEqual(self.quit[1], r[1])