'Construct an XBlock for testing with.'

def get_a_block(self, usage_id=None):

    scope_ids = Mock()
    if (usage_id is None):
        block_id = '_auto{id}'.format(id=len(self.all_blocks))
        usage_id = self.get_usage_id('course', block_id)
    scope_ids.usage_id = usage_id
    block = self.system.construct_xblock_from_class(self.TestableInheritingXBlock, field_data=self.field_data, scope_ids=scope_ids)
    self.all_blocks[usage_id] = block
    return block
