test_split_uploaders.py 708 B

12345678910111213141516171819202122232425
  1. #! /usr/bin/env python3
  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()