Skip to content

Commit

Permalink
[modify] Add main function
Browse files Browse the repository at this point in the history
  • Loading branch information
linzeen committed Feb 8, 2019
1 parent e1da680 commit c6c7326
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions unit_test/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import asyncio
import time
import unittest
from functools import wraps
from unittest import TestCase

from simple_proxy_pool.proxy_pool import ProxyPool
from simple_proxy_pool.spider import XiCiSpider


class TestBase(TestCase):
class TestBase(unittest.TestCase):
def verify_url(self, url):
self.assertRegex(url, r"http://\d+\.\d+\.\d+\.\d+:\d+")

Expand Down Expand Up @@ -78,3 +78,7 @@ def test_get_https_urls(self):
urls = self.pl.get_https_urls(nums=15)
self.assertEqual(len(urls), nums)
self.verify_urls(urls)


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

0 comments on commit c6c7326

Please sign in to comment.