def testCreateModelWithEmptyInstanceIdArg(self):
   """
     Test for the empty dimension field in json.
   """
   data = utils.jsonEncode(self.modelsTestData["create_empty_instanceid_data"])
   response = self.app.put("/", data, status="*", headers=self.headers)
   assertions.assertInvalidArgumentsError(self, response, "json")
 def testCreateModelWithInvalidDatasourceArg(self):
   """
     Test for the invalid metric field in json.
   """
   data = utils.jsonEncode(self.modelsTestData["create_invalid_ds_data"])
   response = self.app.put("/", data, status="*", headers=self.headers)
   assertions.assertInvalidArgumentsError(self, response, "json")
 def testCreateModelWithEmptyMetricArg(self):
   """
     Test for the missing empty metric field in json.
   """
   data = utils.jsonEncode(self.modelsTestData["create_empty_metric_data"])
   response = self.app.put("/", data, status="*", headers=self.headers)
   assertions.assertInvalidArgumentsError(self, response, "json")
Exemple #4
0
 def testCreateModelWithInvalidDatasourceArg(self):
     """
   Test for the invalid metric field in json.
 """
     data = utils.jsonEncode(self.modelsTestData["create_invalid_ds_data"])
     response = self.app.put("/", data, status="*", headers=self.headers)
     assertions.assertInvalidArgumentsError(self, response, "json")
 def testCreateModelWithInvalidRegionKey(self):
   """
     Test for the invalid region field in json.
   """
   data = utils.jsonEncode(self.modelsTestData["create_invalid_region_key"])
   response = self.app.put("/", data, status="*", headers=self.headers)
   assertions.assertInvalidArgumentsError(self, response, "json")
Exemple #6
0
 def testCreateModelWithEmptyRegionArg(self):
     """
   Test for the missing empty datasource field in json.
 """
     data = utils.jsonEncode(self.modelsTestData["create_empty_region"])
     response = self.app.put("/", data, status="*", headers=self.headers)
     assertions.assertInvalidArgumentsError(self, response, "json")
 def testInvalidJsonModelsApi(self):
   """
     Test for the invalid json.
   """
   data = self.modelsTestData["create_data"]
   response = self.app.put("/", data, status="*", headers=self.headers)
   self.assertIn("No JSON object could be decoded", response.body)
   assertions.assertInvalidArgumentsError(self, response, "json")
Exemple #8
0
 def testCreateModelWithEmptyInstanceIdArg(self):
     """
   Test for the empty dimension field in json.
 """
     data = utils.jsonEncode(
         self.modelsTestData["create_empty_instanceid_data"])
     response = self.app.put("/", data, status="*", headers=self.headers)
     assertions.assertInvalidArgumentsError(self, response, "json")
Exemple #9
0
 def testCreateModelWithInvalidRegionKey(self):
     """
   Test for the invalid region field in json.
 """
     data = utils.jsonEncode(
         self.modelsTestData["create_invalid_region_key"])
     response = self.app.put("/", data, status="*", headers=self.headers)
     assertions.assertInvalidArgumentsError(self, response, "json")
Exemple #10
0
 def testInvalidJsonModelsApi(self):
     """
   Test for the invalid json.
 """
     data = self.modelsTestData["create_data"]
     response = self.app.put("/", data, status="*", headers=self.headers)
     self.assertIn("No JSON object could be decoded", response.body)
     assertions.assertInvalidArgumentsError(self, response, "json")