'Assert that the block ``block_usage_key`` has the value ``content`` for ``field_name``
when it is loaded.
Arguments:
block_usage_key: The xblock to check.
field_name (string): The name of the field to check.
content: The value to assert is in the field.
aside_field_name (string): The name of the field to check (in connected xblock aside)
aside_content: The value to assert is in the xblock aside field.
draft (optional): If omitted, verify both published and draft branches.
If True, verify only the draft branch. If False, verify only the
published branch.'

def assertBlockHasContent(self, block_usage_key, field_name, content, aside_field_name=None, aside_content=None, draft=None):

    if ((draft is None) or (not draft)):
        with self.store.branch_setting(ModuleStoreEnum.Branch.published_only):
            target_block = self.store.get_item(block_usage_key)
            self.assertEquals(content, target_block.fields[field_name].read_from(target_block))
            if (aside_field_name and aside_content):
                aside = self._get_aside(target_block)
                self.assertIsNotNone(aside)
                self.assertEquals(aside_content, aside.fields[aside_field_name].read_from(aside))
    if ((draft is None) or draft):
        with self.store.branch_setting(ModuleStoreEnum.Branch.draft_preferred):
            target_block = self.store.get_item(block_usage_key)
            self.assertEquals(content, target_block.fields[field_name].read_from(target_block))
            if (aside_field_name and aside_content):
                aside = self._get_aside(target_block)
                self.assertIsNotNone(aside)
                self.assertEquals(aside_content, aside.fields[aside_field_name].read_from(aside))
