Browse Source

Fail JSON tests that return object where array is required (#4622)

Nate 6 years ago
parent
commit
c47a11fff5
1 changed files with 3 additions and 3 deletions
  1. 3 3
      toolset/benchmark/test_types/verifications.py

+ 3 - 3
toolset/benchmark/test_types/verifications.py

@@ -222,10 +222,10 @@ def verify_randomnumber_list(expected_len,
         return problems
         return problems
 
 
     # This path will be hit when the framework returns a single JSON object
     # This path will be hit when the framework returns a single JSON object
-    # rather than a list containing one element. We allow this with a warn,
-    # then verify the supplied object
+    # rather than a list containing one element.
     if type(response) is not list:
     if type(response) is not list:
-        problems.append(('warn', 'Top-level JSON is an object, not an array',
+        problems.append((max_infraction,
+                         'Top-level JSON is an object, not an array',
                          url))
                          url))
         problems += verify_randomnumber_object(response, url, max_infraction)
         problems += verify_randomnumber_object(response, url, max_infraction)
         return problems
         return problems