'Verifies the results of transforming the blocks in the
course for the given user.'

def _check_results(self, user, expected_accessible_blocks, blocks_with_differing_access, transformers):

    self.client.login(username=user.username, password=self.password)
    block_structure = get_course_blocks(user, self.course.location, transformers)
    for (i, xblock_key) in enumerate(self.xblock_keys):
        block_structure_result = (xblock_key in block_structure)
        self.assertEquals(block_structure_result, (i in expected_accessible_blocks), 'block_structure    return    value    {0}    not    equal    to    expected    value    for    block    {1}    for    user    {2}'.format(block_structure_result, i, user.username))
        if blocks_with_differing_access:
            has_access_result = bool(has_access(user, 'load', self.get_block(i), course_key=self.course.id))
            if (i in blocks_with_differing_access):
                self.assertNotEqual(block_structure_result, has_access_result, 'block    structure    ({0})    &    has_access    ({1})    results    are    equal    for    block    {2}    for    user    {3}'.format(block_structure_result, has_access_result, i, user.username))
            else:
                self.assertEquals(block_structure_result, has_access_result, 'block    structure    ({0})    &    has_access    ({1})    results    not    equal    for    block    {2}    for    user    {3}'.format(block_structure_result, has_access_result, i, user.username))
    self.client.logout()
