How to use the blackhole.connection.handle_command function in blackhole

To help you get started, we’ve selected a few blackhole examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kura / blackhole / tests / test_responses.py View on Github external
def test_handle_command_starttls_response(self):
        m = MailState()
        r = handle_command("STARTTLS", m)
        self.assertEqual(self.ok[0], r[0])
github kura / blackhole / tests / test_responses.py View on Github external
def test_handle_command_ehlo_response_1024(self):
        m = MailState()
        r = handle_command("EHLO", m)
        self.assertEqual(self.ehlo[0], r[0])
github kura / blackhole / tests / test_responses.py View on Github external
def test_handle_command_vrfy_response(self):
        m = MailState()
        r = handle_command("VRFY", m)
        self.assertEqual(self.vrfy[0], r[0])
github kura / blackhole / tests / test_responses.py View on Github external
def test_handle_command_rcpt_to_reading_state(self):
        m = MailState()
        handle_command("RCPT TO", m)
        self.assertEqual(m.reading, False)
github kura / blackhole / tests / test_responses.py View on Github external
def test_handle_command_ehlo_connection_close_1024(self):
        m = MailState()
        r = handle_command("EHLO", m)
        self.assertEqual(self.ehlo[1], r[1])
github kura / blackhole / tests / test_responses.py View on Github external
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])
github kura / blackhole / tests / test_responses.py View on Github external
def test_handle_command_rset_response(self):
        m = MailState()
        r = handle_command("RSET", m)
        self.assertEqual(self.ok_done[0], r[0])
github kura / blackhole / tests / test_responses.py View on Github external
def test_handle_crommand_rset_reading_state(self):
        m = MailState()
        handle_command("RSET", m)
        self.assertEqual(m.reading, False)
github kura / blackhole / tests / test_responses.py View on Github external
def test_handle_command_rset_connection_close(self):
        m = MailState()
        r = handle_command("RSET", m)
        self.assertEqual(self.ok_done[1], r[1])
github kura / blackhole / tests / test_responses.py View on Github external
def test_handle_command_starttls_reading_state(self):
        m = MailState()
        handle_command("STARTTLS", m)
        self.assertEqual(m.reading, False)