2022-07-21 08:44:10 +08:00
|
|
|
import unittest
|
2022-07-22 16:31:27 +08:00
|
|
|
from Base.Class.Logger import *
|
|
|
|
from Base.Class.Http import *
|
|
|
|
log = Logger(name='test', level='DEBUG', ch={
|
|
|
|
"level": 'DEBUG',
|
|
|
|
"format": '{asctime} - {name} - {levelname[0]}: {message}'
|
|
|
|
})
|
2022-07-21 08:44:10 +08:00
|
|
|
|
|
|
|
|
|
|
|
class TestDemo(unittest.TestCase):
|
|
|
|
def test_one(self):
|
|
|
|
assert 1 == 1
|
2022-07-22 17:04:39 +08:00
|
|
|
# log.i("Info...")
|
|
|
|
# log.w("Warnning...")
|
2022-07-21 08:44:10 +08:00
|
|
|
|
|
|
|
def test_two(self):
|
2022-07-22 17:04:39 +08:00
|
|
|
# log.d("正在断言...")
|
2022-07-22 16:31:27 +08:00
|
|
|
assert 'A' in 'Hello!', '断言失败'
|
2022-07-21 08:44:10 +08:00
|
|
|
|
|
|
|
def test_tre(self):
|
2022-07-22 16:31:27 +08:00
|
|
|
assert a == 10
|
|
|
|
|
|
|
|
def test_0123456789ABCDEF_123456_000000(self):
|
|
|
|
Request().http('GET',"http://more-md.fanscloud.net/iplookup", proxy="http://127.0.0.1:8888")
|
|
|
|
pass
|
2022-07-21 08:44:10 +08:00
|
|
|
|
|
|
|
|
2022-07-22 16:31:27 +08:00
|
|
|
if __name__ == '__main__':
|
|
|
|
unittest.main()
|