add dependency unit test (WIP)
This commit is contained in:
parent
906f0320d1
commit
511aa79fc8
1 changed files with 22 additions and 0 deletions
22
test/unit_tests_d/ut_dep.py
Executable file
22
test/unit_tests_d/ut_dep.py
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env python3
|
||||
"""
|
||||
test.unit_tests_d.ut_rpc: dependency unit tests for the MMGen suite
|
||||
"""
|
||||
|
||||
from mmgen.common import *
|
||||
|
||||
class unit_tests:
|
||||
|
||||
def pysocks(self,name,ut):
|
||||
import requests,urllib3
|
||||
urllib3.disable_warnings()
|
||||
session = requests.Session()
|
||||
session.proxies.update({'https':'socks5h://127.243.172.8:20677'})
|
||||
try:
|
||||
session.get('https://127.188.29.17')
|
||||
except Exception as e:
|
||||
if type(e).__name__ == 'ConnectionError':
|
||||
return True
|
||||
else:
|
||||
print(e)
|
||||
return False
|
||||
Loading…
Add table
Add a link
Reference in a new issue