'Tests the order of transformers: access checks are made before the api
transformer is applied.'

def test_access_before_api_transformer_order(self):

    blocks = get_blocks(self.request, self.course.location, self.user, nav_depth=5, requested_fields=['nav_depth'])
    vertical_block = self.store.get_item(self.course.id.make_usage_key('vertical', 'vertical_x1a'))
    problem_block = self.store.get_item(self.course.id.make_usage_key('problem', 'problem_x1a_1'))
    vertical_descendants = blocks['blocks'][unicode(vertical_block.location)]['descendants']
    self.assertIn(unicode(problem_block.location), vertical_descendants)
    self.assertNotIn(unicode(self.html_block.location), vertical_descendants)
