test_split_uploaders.py 706 Bytes
Newer Older
1 2 3 4
#!/usr/bin/env python

from base_test import DakTestCase

5
from daklib.textutils import split_uploaders
6 7 8

import unittest

9

10 11 12 13 14
class SplitUploadersTestCase(DakTestCase):
    def test_main(self):
        expected = ['"A, B" <a@b.c>', 'D E <d@e.f>']
        l = list(split_uploaders('"A, B" <a@b.c>, D E <d@e.f>'))
        self.assertEqual(expected, l)
15 16 17 18 19 20
        l = list(split_uploaders('"A, B" <a@b.c> , D E <d@e.f>'))
        self.assertEqual(expected, l)
        l = list(split_uploaders('"A, B" <a@b.c>,D E <d@e.f>'))
        self.assertEqual(expected, l)
        l = list(split_uploaders('"A, B" <a@b.c>   ,D E <d@e.f>'))
        self.assertEqual(expected, l)
21

22

23 24
if __name__ == '__main__':
    unittest.main()