test_common.py 363 B

1234567891011
  1. #!/usr/bin/env python
  2. import unittest
  3. from you_get.common import *
  4. class TestCommon(unittest.TestCase):
  5. def test_match1(self):
  6. self.assertEqual(match1('http://youtu.be/1234567890A', r'youtu.be/([^/]+)'), '1234567890A')
  7. self.assertEqual(match1('http://youtu.be/1234567890A', r'youtu.be/([^/]+)', r'youtu.(\w+)'), ['1234567890A', 'be'])