Commit 7031d4d1 by 杨林龙

优化测试用例

1 parent f9b75483
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import pymysql import pymysql
# 连接database # 连接database
conn = pymysql.connect(host='192.168.3.190', port=3306, user='dev_user', password='df234fl', database='neshield', conn = pymysql.connect(host='192.168.3.227', port=3306, user='dev_user', password='df234fl', database='neshield',
charset='utf8') charset='utf8')
# 得到一个可以执行SQL语句的光标对象 # 得到一个可以执行SQL语句的光标对象
cursor = conn.cursor() cursor = conn.cursor()
......
import unittest
class MyTest(unittest.TestCase):
def test_addition(self):
result = 2 + 2
self.assertEqual(result, 4)
def test_subtraction(self):
result = 5 - 3
self.assertEqual(result, 2)
def fname(self):
result = 5 - 3
self.assertEqual(result, 2)
if __name__ == "__main__":
unittest.main()
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!