Beispiel #1
0
 def setUp(self):
     self.keywords = ["python", "redis", "django"]
     self.proxies = ['91.193.253.188:23500', '36.66.61.7:56232']
     self.proxy_list = [{
         'http': 'http://91.193.253.188:23500',
         'https': 'https://91.193.253.188:23500'
     }, {
         'http': 'http://36.66.61.7:56232',
         'https': 'https://36.66.61.7:56232'
     }]
     self.obj_type = "Wikis"
     self.urls = get_urls(self.keywords, self.proxy_list, self.obj_type)
     self.result_wikis = [{
         "url":
         "https://github.com/balakrishnanm/mybook/wiki/Python-Django"
     }, {
         "url":
         "https://github.com/alibond/appunti.italiadigitale.docs/wiki/Django"
     }, {
         "url":
         "https://github.com/victorhooi/victorwiki/wiki/django"
     }, {
         "url":
         "https://github.com/kailiu-unsw/python/wiki/Django"
     }, {
         "url":
         "https://github.com/cfbatalla/LenguajesDeAltoNivel/wiki/Django"
     }]
Beispiel #2
0
 def setUp(self):
     self.keywords = ["python", "redis", "django"]
     self.obj_type = "Issues"
     self.urls = get_urls(self.keywords, self.obj_type)
     self.result_issues = [{
         "url":
         "https://github.com/andreagrandi/covid-api/issues/1"
     }, {
         "url":
         "https://github.com/Prefeitura-Comunica/thread/issues/3"
     }, {
         "url":
         "https://github.com/deity-io/falcon/issues/770"
     }, {
         "url": "https://github.com/zgq105/blog/issues/80"
     }]
Beispiel #3
0
 def setUp(self):
     self.keywords = ["python", "redis", "django"]
     self.proxies = ['91.193.253.188:23500', '36.66.61.7:56232']
     self.proxy_list = [{
         'http': 'http://91.193.253.188:23500',
         'https': 'https://91.193.253.188:23500'
     }, {
         'http': 'http://36.66.61.7:56232',
         'https': 'https://36.66.61.7:56232'
     }]
     self.obj_type = "Repositories"
     self.urls = get_urls(self.keywords, self.proxy_list, self.obj_type)
     self.result_repos = [{
         "url": "https://github.com/fabiocaccamo/django-freeze",
         "extra": {
             "owner": "fabiocaccamo",
             "language_stats": {
                 "Python": 94.7,
                 "HTML": 3.3,
                 "JavaScript": 2.0
             }
         }
     }, {
         "url": "https://github.com/Anupam-dagar/Portfolio-Generator",
         "extra": {
             "owner": "Anupam-dagar",
             "language_stats": {
                 "Python": 56.7,
                 "JavaScript": 27.7,
                 "HTML": 15.6
             }
         }
     }, {
         "url": "https://github.com/justdjango/Shopping_cart",
         "extra": {
             "owner": "justdjango",
             "language_stats": {
                 "JavaScript": 48.3,
                 "CSS": 30.1,
                 "Python": 12.8,
                 "HTML": 8.8
             }
         }
     }]
Beispiel #4
0
 def setUp(self):
     self.keywords = ["python", "redis", "django"]
     self.obj_type = "Wikis"
     self.urls = get_urls(self.keywords, self.obj_type)
     self.result_wikis = [{
         "url":
         "https://github.com/balakrishnanm/mybook/wiki/Python-Django"
     }, {
         "url":
         "https://github.com/alibond/appunti.italiadigitale.docs/wiki/Django"
     }, {
         "url":
         "https://github.com/victorhooi/victorwiki/wiki/django"
     }, {
         "url":
         "https://github.com/kailiu-unsw/python/wiki/Django"
     }, {
         "url":
         "https://github.com/cfbatalla/LenguajesDeAltoNivel/wiki/Django"
     }]
Beispiel #5
0
 def setUp(self):
     self.keywords = ["python", "redis", "django"]
     self.proxies = ['91.193.253.188:23500', '36.66.61.7:56232']
     self.proxy_list = [{
         'http': 'http://91.193.253.188:23500',
         'https': 'https://91.193.253.188:23500'
     }, {
         'http': 'http://36.66.61.7:56232',
         'https': 'https://36.66.61.7:56232'
     }]
     self.obj_type = "Issues"
     self.urls = get_urls(self.keywords, self.proxy_list, self.obj_type)
     self.result_issues = [{
         "url":
         "https://github.com/andreagrandi/covid-api/issues/1"
     }, {
         "url":
         "https://github.com/Prefeitura-Comunica/thread/issues/3"
     }, {
         "url":
         "https://github.com/deity-io/falcon/issues/770"
     }, {
         "url": "https://github.com/zgq105/blog/issues/80"
     }]
Beispiel #6
0
 def test_get_urls(self):
     urls = get_urls(self.keywords, self.obj_type)
     self.assertTrue(urls)