'Verify that course_structure returns info for required block_types only when specific block_types are requested.'

def test_course_structure_with_block_types(self):

    block_types = ['html', 'video']
    with mock.patch(self.MOCK_CACHE, cache.caches['default']):
        with self.assertNumQueries(3):
            structure = course_structure(self.course.id, block_types=block_types)
    expected = {u'root': unicode(self.course.location), u'blocks': self._expected_blocks(block_types=block_types, get_parent=True)}
    self.assertDictEqual(structure, expected)
    with mock.patch(self.MOCK_CACHE, cache.caches['default']):
        with self.assertNumQueries(2):
            course_structure(self.course.id, block_types=block_types)
