Browse Source

Fixing bug where verification uses invalid json objects

Hamilton Turner 10 years ago
parent
commit
0076fda7ce
1 changed files with 5 additions and 1 deletions
  1. 5 1
      toolset/benchmark/test_types/db_type.py

+ 5 - 1
toolset/benchmark/test_types/db_type.py

@@ -73,7 +73,11 @@ class DBTestType(FrameworkTestType):
     if "id" not in db_object:
     if "id" not in db_object:
       problems.append( ('fail', "Response has no 'id' key", url) ) 
       problems.append( ('fail', "Response has no 'id' key", url) ) 
     if "randomnumber" not in db_object:
     if "randomnumber" not in db_object:
-      problems.append( ('fail', "Response has no 'randomNumber' key", url) ) 
+      problems.append( ('fail', "Response has no 'randomNumber' key", url) )
+    
+    # Ensure we can continue on to use these keys
+    if "id" not in db_object or "randomnumber" not in db_object:
+      return problems
 
 
     try:
     try:
       float(db_object["id"])
       float(db_object["id"])