'Test deleting a child.'

def test_delete_child(self):

    resp_1 = self.create_xblock(display_name='child    1', category='chapter')
    resp_2 = self.create_xblock(display_name='child    2', category='chapter')
    chapter1_usage_key = self.response_usage_key(resp_1)
    chapter2_usage_key = self.response_usage_key(resp_2)
    course = self.get_item_from_modulestore(self.usage_key)
    self.assertIn(chapter1_usage_key, course.children)
    self.assertIn(chapter2_usage_key, course.children)
    resp = self.client.delete(reverse_usage_url('xblock_handler', chapter1_usage_key))
    self.assertEqual(resp.status_code, 204)
    course = self.get_item_from_modulestore(self.usage_key)
    self.assertNotIn(chapter1_usage_key, course.children)
    self.assertIn(chapter2_usage_key, course.children)
