forked from p15670423/monkey
测试:重复提交代码
This commit is contained in:
parent
f5bfdc430c
commit
4505399049
|
@ -0,0 +1,21 @@
|
||||||
|
import unittest
|
||||||
|
from mock import Mock
|
||||||
|
|
||||||
|
|
||||||
|
def VerifyPhone():
|
||||||
|
'''
|
||||||
|
校验用户手机号
|
||||||
|
'''
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
class TestVerifyPhone(unittest.TestCase):
|
||||||
|
|
||||||
|
def test_verify_phone(self):
|
||||||
|
data = {"code": "0000", "msg": {"result": "success", "phoneinfo": "移动用户"}}
|
||||||
|
VerifyPhone = Mock(return_value=data)
|
||||||
|
self.assertEqual("success", VerifyPhone()["msg"]["result"])
|
||||||
|
print('测试用例')
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
unittest.main(verbosity=2)
|
Loading…
Reference in New Issue