def load(self): self.json_data = open(self.path) self.data = json.load(self.json_data) # Loop over the items and put into list metricItems = self.data["items"] for i in metricItems: item = MetricItem() item.setName(str(i["name"])) item.setPollingInterval(int(i["pollInterval"])) item.setCommand(str(i["command"])) item.setDebug(bool(i["debug"])) self.config.append(item)
def testPollInterval(self): m = MetricItem() m.setDebug(True) self.assertEquals(m.getDebug(), True, "Debug not equal")