def test_write_pipeline(self): """Test that the provided entity gets written to the repository.""" entity = PipelineEntity.get_mock_object() with self.assertRaises(ResourceNotFoundException): PipelineService.fetch_pipeline_by_id(entity.id) PipelineService.write_pipeline(entity) self.assertEquals( PipelineService.fetch_pipeline_by_id(entity.id), entity, )
def test_write_pipeline(self): """Test that the provided entity gets written to the repository.""" entity = PipelineEntity.get_mock_object() with self.assertRaises(ResourceNotFoundException): PipelineService.fetch_pipeline_by_id(entity.id) PipelineService.write_pipeline(entity) self.assertEquals( PipelineService.fetch_pipeline_by_id(entity.id), entity, )
def test_fetch_pipeline_by_id(self, mock_fetch): """Test that you can fetch a PipelineEntity by ID.""" mock_fetch.return_value = self.pipeline entity = PipelineService.fetch_pipeline_by_id(self.pipeline.id) self.assertEquals( entity.id, self.pipeline.id, )
def test_fetch_pipeline_by_id(self, mock_fetch): """Test that you can fetch a PipelineEntity by ID.""" mock_fetch.return_value = self.pipeline entity = PipelineService.fetch_pipeline_by_id(self.pipeline.id) self.assertEquals( entity.id, self.pipeline.id, )