コード例 #1
0
ファイル: test_pop3.py プロジェクト: Bobboya/vizitown_plugin
    def testListLineFormatter(self):
        """
        Test that the function which formats the lines in response to a LIST
        command does so appropriately.
        """
        listLines = list(pop3.formatListResponse([]))
        self.assertEqual(listLines, ["+OK 0\r\n", ".\r\n"])

        listLines = list(pop3.formatListResponse([1, 2, 3, 100]))
        self.assertEqual(listLines, ["+OK 4\r\n", "1 1\r\n", "2 2\r\n", "3 3\r\n", "4 100\r\n", ".\r\n"])
コード例 #2
0
    def testListLineFormatter(self):
        """
        Test that the function which formats the lines in response to a LIST
        command does so appropriately.
        """
        listLines = list(pop3.formatListResponse([]))
        self.assertEqual(listLines, ['+OK 0\r\n', '.\r\n'])

        listLines = list(pop3.formatListResponse([1, 2, 3, 100]))
        self.assertEqual(listLines, [
            '+OK 4\r\n', '1 1\r\n', '2 2\r\n', '3 3\r\n', '4 100\r\n', '.\r\n'
        ])