Browse Source

modify upload and test

tangs 6 years ago
parent
commit
fb439ec653
2 changed files with 11 additions and 3 deletions
  1. 2 2
      upload.py
  2. 9 1
      upload_test.py

+ 2 - 2
upload.py

@@ -56,8 +56,8 @@ class Handle:
             content['schema'] = ''
         if not content.__contains__('login_name'):
             content['login_name'] = ''
-        if not content.__contains__('pwd'):
-            content['pwd'] = ''
+        # if not content.__contains__('pwd'):
+        #     content['pwd'] = ''
         if not content.__contains__('kpi'):
             content['kpi'] = {}
         return content

+ 9 - 1
upload_test.py

@@ -14,7 +14,15 @@ class UploadTest(unittest.TestCase):
             'dev_ip': 'local.pc',
             'port': ':9011',
             'type': 'camera',
-            'pwd': time.time()
+            'schema': 'onvif',
+            'kpi': {
+                'img_light': 100,
+                'img_cast': 100,
+                'img_rgcast': 100,
+                'img_lightcast': 100,
+                'img_clear': 100,
+                'img_ybcast': 100,
+            }
         }
 
     def test_generate_file(self):