AutoFramework/test_case.py

33 lines
826 B
Python

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_one(self):
'''
ONE用例
:return:
'''
assert 1 == 1
log.i("Info...")
log.w("Warnning...")
def test_two(self):
log.d("正在断言...")
assert 'A' in 'Hello!', '断言失败'
def test_tre(self):
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
if __name__ == '__main__':
unittest.main()