Browse Source

DeliveryService测试

世祺 1 year ago
parent
commit
404b7d969a
5 changed files with 206 additions and 2 deletions
  1. 2 1
      .gitignore
  2. 1 0
      proto
  3. 1 1
      src/ll_sdk/base_client.py
  4. 12 0
      src/test.py
  5. 190 0
      测试.ipynb

+ 2 - 1
.gitignore

@@ -157,4 +157,5 @@ cython_debug/
 #  be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
 #  and can be added to the global gitignore or merged into this file.  For a more nuclear
 #  option (not recommended) you can uncomment the following to ignore the entire idea folder.
-#.idea/
+.idea/
+*.bin

+ 1 - 0
proto

@@ -0,0 +1 @@
+Subproject commit ce4ce8577ab5a94483758772c79cf112864265de

+ 1 - 1
src/ll_sdk/base_client.py

@@ -82,7 +82,7 @@ class BaseRestAuthClient(object):
         self._session = requests.Session()
 
     def __del__(self):
-        self._session.close()
+        self._session.close
 
     def _make_request(self, method, url, *, timeout=300, **kwargs):
         req_headers = self.default_headers.copy()

+ 12 - 0
src/test.py

@@ -0,0 +1,12 @@
+from ll_sdk.config_api import ConfigApiClient
+
+if __name__ == '__main__':
+    username = "chl20000826@163.com"
+    shared_key = "0f4912881c27a33dcfcf2ab6e2dc286c065a559000926bc9d1fc25d4228bb5cd"
+
+    cl = ConfigApiClient('apis.llnw.com', username, shared_key)
+    res = cl.list_delivery_service_instances("centtest")
+    print(res.json())
+    # print(cl.get_status().json())
+    # print(cl.get_health_check().json())
+    # exit(0)

File diff suppressed because it is too large
+ 190 - 0
测试.ipynb