'Test that the capa type filter is actually filtering children'

def test_capa_type_filtering(self):

    self._create_capa_problems()
    self.assertEqual(len(self.lc_block.children), 0)
    self.lc_block.capa_type = 'multiplechoiceresponse'
    self.lc_block.refresh_children()
    self.assertEqual(len(self.lc_block.children), 1)
    self.lc_block.capa_type = 'optionresponse'
    self.lc_block.refresh_children()
    self.assertEqual(len(self.lc_block.children), 3)
    self.lc_block.capa_type = 'coderesponse'
    self.lc_block.refresh_children()
    self.assertEqual(len(self.lc_block.children), 2)
    self.lc_block.capa_type = 'customresponse'
    self.lc_block.refresh_children()
    self.assertEqual(len(self.lc_block.children), 0)
    self.lc_block.capa_type = ANY_CAPA_TYPE_VALUE
    self.lc_block.refresh_children()
    self.assertEqual(len(self.lc_block.children), (len(self.lib_blocks) + 4))
