Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_handle_command_unknown_command_reading_state(self):
m = MailState()
handle_command("KURA", m)
self.assertEqual(m.reading, False)
def test_handle_command_data_response(self):
m = MailState()
r = handle_command("DATA", m)
self.assertEqual(self.data[0], r[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])
def test_handle_command_starttls_connection_close(self):
m = MailState()
r = handle_command("STARTTLS", m)
self.assertEqual(self.ok[1], r[1])
def test_handle_command_starttls_reading_state(self):
m = MailState()
handle_command("STARTTLS", m)
self.assertEqual(m.reading, False)
def test_handle_command_rcpt_to_response(self):
m = MailState()
r = handle_command("RCPT TO", m)
self.assertEqual(self.ok_done[0], r[0])
def test_handle_command_helo_reading_state(self):
m = MailState()
handle_command("HELO", m)
self.assertEqual(m.reading, False)
def test_handle_command_quit_reading_state(self):
m = MailState()
handle_command("QUIT", m)
self.assertEqual(m.reading, False)
def test_handle_command_helo_response(self):
m = MailState()
r = handle_command("HELO", m)
self.assertEqual(self.ok_done[0], r[0])
def test_handle_command_rcpt_to_reading_state(self):
m = MailState()
handle_command("RCPT TO", m)
self.assertEqual(m.reading, False)