Browse Source

More Travis testing

Steven Smith 9 years ago
parent
commit
91c817825e

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

@@ -26,7 +26,7 @@ class DBTestType(FrameworkTestType):
         url = base_url + self.db_url
         headers, body = self.request_headers_and_body(url)
 
-        response, problems = basic_body_verification(body)
+        response, problems = basic_body_verification(body, url)
 
         if len(problems) > 0:
             return problems 

+ 1 - 1
toolset/benchmark/test_types/fortune_type.py

@@ -26,7 +26,7 @@ class FortuneTestType(FrameworkTestType):
         url = base_url + self.fortune_url
         headers, body = self.request_headers_and_body(url)
 
-        _, problems = basic_body_verification(body, is_json_check=False)
+        _, problems = basic_body_verification(body, url, is_json_check=False)
 
         if len(problems) > 0:
             return problems

+ 1 - 1
toolset/benchmark/test_types/json_type.py

@@ -31,7 +31,7 @@ class JsonTestType(FrameworkTestType):
         url = base_url + self.json_url
         headers, body = self.request_headers_and_body(url)
 
-        response, problems = basic_body_verification(body)
+        response, problems = basic_body_verification(body, url)
 
         if len(problems) > 0:
             return problems

+ 1 - 1
toolset/benchmark/test_types/plaintext_type.py

@@ -17,7 +17,7 @@ class PlaintextTestType(FrameworkTestType):
         url = base_url + self.plaintext_url
         headers, body = self.request_headers_and_body(url)
 
-        _, problems = basic_body_verification(body, is_json_check=False)
+        _, problems = basic_body_verification(body, url, is_json_check=False)
 
         if len(problems) > 0:
             return problems

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

@@ -1,7 +1,7 @@
 import json
 
 
-def basic_body_verification(body, is_json_check=True):
+def basic_body_verification(body, url, is_json_check=True):
     '''
     Takes in a raw (stringy) response body, checks that it is non-empty,
     and that it is valid JSON (i.e. can be deserialized into a dict/list of dicts)
@@ -177,7 +177,7 @@ def verify_randomnumber_list(expected_len, headers, body, url, max_infraction='f
     [{ "id": 2354, "randomNumber": 8952 }, { "id": 4421, "randomNumber": 32 }, ... ]
     '''
     
-    response, problems = basic_body_verification(body)
+    response, problems = basic_body_verification(body, url)
 
     if len(problems) > 0:
         return problems