def test_job(self): data = {} self.assertRaises(Exception, Job.from_data, data) data["kind"] = "awesome" self.assertRaises(Exception, Job.from_data, data) data["unique_id"] = 1 job = Job.from_data(data) self.assertIsNotNone(job.get("id"))
def setUp(self): httpretty.enable() self.data = {"awesome": 1} self.data_json = json.dumps(self.data) self.job = Job.from_data( { "kind": "http", "unique_id": "1", "request_module": {"url": "http://example.com", "method": "GET"}, "output": {}, } ) self.request_module = modules.RequestsModule(name="request_module")
def setUp(self): self.job = Job.from_data(dict(kind="module_test", unique_id="1"))
def setUp(self): self.job = Job.from_data(dict(kind='pipeline_test', unique_id='1'))