36 lines
944 B
Python
36 lines
944 B
Python
import time
|
|
import unittest
|
|
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}'
|
|
})
|
|
|
|
|
|
class TestDemo(unittest.TestCase):
|
|
def test_one1(self):
|
|
time.sleep(0.047)
|
|
# import os
|
|
# os.system('echo Case One1 Exec...')
|
|
# time.sleep(5)
|
|
assert 1 == 1
|
|
# log.i("Info...")
|
|
# log.w("Warnning...")
|
|
|
|
def test_two22(self):
|
|
time.sleep(0.036)
|
|
# log.d("正在断言...")
|
|
assert 'A' in 'Hello!', '断言失败'
|
|
|
|
def test_tre333(self):
|
|
time.sleep(0.025)
|
|
# assert a == 10
|
|
|
|
def test_0123456789ABC(self):
|
|
Request().http('GET',"http://more-md.fanscloud.net/iplookup", proxy="http://127.0.0.1:8888")
|
|
pass
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main() |