def test_add_metric_duplicate_empty_bucket(self): params = {"type": "metric", "name": uhex(), "cluster": "East", "server": "ec2-54-242-160-13.compute-1.amazonaws.com", "collector": "ns_server"} request = self.factory.post("/add_metric", params) views.add_metric(request) response = views.add_metric(request) self.response = response
def test_add_metric_duplicate_empty_server(self): params = {"type": "metric", "name": uhex(), "cluster": "East", "bucket": "default", "collector": "ns_server"} request = self.factory.post("/add_metric", params) views.add_metric(request) response = views.add_metric(request) self.response = response
def test_add_metric_no_server(self): params = {"type": "metric", "name": uhex(), "cluster": "East", "bucket": "default", "collector": "ns_server"} request = self.factory.post("/add_metric", params) response = views.add_metric(request) # Verify persistence self.test_get_metrics_no_server(params) self.response = response
def test_add_metric(self): params = {"type": "metric", "name": uhex(), "cluster": "East", "server": "ec2-54-242-160-13.compute-1.amazonaws.com", "bucket": "default", "collector": "ns_server"} request = self.factory.post("/add_metric", params) response = views.add_metric(request) # Verify persistence self.test_get_metrics(params) self.response = response