test_split_uploaders.py 704 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env python
  2. from base_test import DakTestCase
  3. from daklib.textutils import split_uploaders
  4. import unittest
  5. class SplitUploadersTestCase(DakTestCase):
  6. def test_main(self):
  7. expected = ['"A, B" <a@b.c>', 'D E <d@e.f>']
  8. l = list(split_uploaders('"A, B" <a@b.c>, D E <d@e.f>'))
  9. self.assertEqual(expected, l)
  10. l = list(split_uploaders('"A, B" <a@b.c> , D E <d@e.f>'))
  11. self.assertEqual(expected, l)
  12. l = list(split_uploaders('"A, B" <a@b.c>,D E <d@e.f>'))
  13. self.assertEqual(expected, l)
  14. l = list(split_uploaders('"A, B" <a@b.c> ,D E <d@e.f>'))
  15. self.assertEqual(expected, l)
  16. if __name__ == '__main__':
  17. unittest.main()