'Check that all blocks in the list are draft blocks in the OLX format when the course is exported.'

def _assertOLXBase(self, block_list, draft, published):

    for block_data in block_list:
        block_params = self.course_db.get(block_data)
        self.assertIsNotNone(block_params)
        (block_type, block_id) = block_data
        if draft:
            element = self.parse_olx(block_type, block_id, draft=True)
            self.assertOLXProperties(element, block_type, self.course.id, draft=True, **block_params)
        else:
            self.assertOLXMissing(block_type, block_id, draft=True)
        if published:
            element = self.parse_olx(block_type, block_id, draft=False)
            self.assertOLXProperties(element, block_type, self.course.id, draft=False, **block_params)
        else:
            self.assertOLXMissing(block_type, block_id, draft=False)
