How to use the aioimaplib.aioimaplib._split_responses function in aioimaplib

To help you get started, we’ve selected a few aioimaplib 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 bamthomas / aioimaplib / tests / test_aioimaplib.py View on Github external
def test_split_responses_with_message_data_expunge(self):
        self.assertEquals([b'* 123 EXPUNGE', b'TAG OK SELECT completed.'],
                          _split_responses(b'* 123 EXPUNGE\r\nTAG OK SELECT completed.\r\n'))
github bamthomas / aioimaplib / tests / test_aioimaplib.py View on Github external
def test_split_responses_regular_lines(self):
        self.assertEquals([b'* BYE Logging out', b'CAPB2 OK LOGOUT completed'],
                          _split_responses(b'* BYE Logging out\r\nCAPB2 OK LOGOUT completed\r\n'))
github bamthomas / aioimaplib / tests / test_aioimaplib.py View on Github external
def test_split_responses_with_message_data(self):
        self.assertEquals([b'* FETCH ...\r\n(mail content)\r\n...\r\n)',
                           b'TAG OK FETCH completed.'],
                          _split_responses(
                              b'* 1 FETCH (UID 1 RFC822 {26}\r\n...\r\n(mail content)\r\n...\r\n)\r\n'
                              b'TAG OK FETCH completed.'))
github bamthomas / aioimaplib / tests / test_aioimaplib.py View on Github external
def test_split_responses_no_data(self):
        self.assertEquals([], _split_responses(b''))
github bamthomas / aioimaplib / tests / test_aioimaplib.py View on Github external
def test_split_responses_with_flag_fetch_message_data(self):
        self.assertEquals([b'* 1 FETCH (UID 10 FLAGS (FOO))',
                           b'* 1 FETCH (UID 15 FLAGS (BAR))',
                           b'TAG OK STORE completed.'],
                          _split_responses(b'* 1 FETCH (UID 10 FLAGS (FOO))\r\n'
                                           b'* 1 FETCH (UID 15 FLAGS (BAR))\r\n'
github bamthomas / aioimaplib / tests / test_aioimaplib.py View on Github external
def test_split_responses_with_two_messages_data(self):
        self.assertEquals([b'* FETCH mail 1\r\n)',
                           b'* FETCH mail 2\r\n)',
                           b'TAG OK FETCH completed.'],
                          _split_responses(
                              b'* 3 FETCH (UID 3 RFC822 {8}\r\nmail 1\r\n)\r\n'
                              b'* 4 FETCH (UID 4 RFC822 {8}\r\nmail 2\r\n)\r\n'