|
@@ -2,7 +2,7 @@ import unittest
|
|
|
|
|
|
import requests
|
|
import requests
|
|
|
|
|
|
-from util import req, reqGet
|
|
|
|
|
|
+from util import req, reqGet, reqForm
|
|
|
|
|
|
|
|
|
|
class MyTest(unittest.TestCase):
|
|
class MyTest(unittest.TestCase):
|
|
@@ -24,3 +24,41 @@ class MyTest(unittest.TestCase):
|
|
|
|
|
|
res = reqGet("https://edsp.rxdptest.k5.bigtree.tech/api/rxdp-xdata-web/dataSource/pageList", {})
|
|
res = reqGet("https://edsp.rxdptest.k5.bigtree.tech/api/rxdp-xdata-web/dataSource/pageList", {})
|
|
print(len(res['data']))
|
|
print(len(res['data']))
|
|
|
|
+
|
|
|
|
+ def testhttp(self):
|
|
|
|
+ req("https://httpbin.org/post",
|
|
|
|
+ {"username": "刘学良", "password": "lxl123456", "type": "account"})
|
|
|
|
+
|
|
|
|
+ # 原子标签
|
|
|
|
+ def testComputer(self):
|
|
|
|
+ reqForm("http://localhost:8080/test/dealWithTagCompute", {
|
|
|
|
+ "computeType": 3,
|
|
|
|
+ "dataSourceCode": "mysqlTestHu123",
|
|
|
|
+ "dataSourceType": "mysql",
|
|
|
|
+ "dimensionNo": "10449",
|
|
|
|
+ "dimensionsName": "amount",
|
|
|
|
+ "entityName": "实体测试HU421445",
|
|
|
|
+ "entityNo": "EN882632280592436445",
|
|
|
|
+ "primaryKey": "projectcode",
|
|
|
|
+ "primaryTableName": "shopping",
|
|
|
|
+ "tagName": "采购类型222",
|
|
|
|
+ "tagNo": "TAG16693657062277747"
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ # 衍生标签
|
|
|
|
+ def testComputer2(self):
|
|
|
|
+ reqForm("http://localhost:8080/test/dealWithTagCompute",
|
|
|
|
+ {"computeType": 1, "dataSourceCode": "mysqlTestHu123", "dataSourceType": "mysql",
|
|
|
|
+ "entityName": "mysqlTestShopping33333(mysql数据源)", "entityNo": "EN875254841037837824",
|
|
|
|
+ "packageId": "rxdp/mySqlShoppingTest112", "primaryKey": "projectcode", "primaryTableName": "shopping",
|
|
|
|
+ "statisticsCycle": "year", "statisticsCycleTime": "createtime",
|
|
|
|
+ "tagName": "衍生标签测试多数据源mysql33333", "tagNo": "TAG16674623867383022", "timeStyle": "TS2"})
|
|
|
|
+
|
|
|
|
+ # sql标签
|
|
|
|
+ def testComputer3(self):
|
|
|
|
+ reqForm("http://localhost:8080/test/dealWithTagCompute",
|
|
|
|
+ {"computeType": 2, "dataSourceCode": "mysqlTestHu123", "dataSourceType": "mysql",
|
|
|
|
+ "entityName": "mysql实体HU123", "entityNo": "EN879274694203750264", "primaryKey": "business_code",
|
|
|
|
+ "primaryTableName": "shopping",
|
|
|
|
+ "tagCompuleSql": "SELECT projectcode AS businessCode,amount AS tagValue FROM shopping LIMIT ${startNum},${endNum}",
|
|
|
|
+ "tagName": "SQL标签HU1112", "tagNo": "TAG16684123244372739"})
|