'Ensures that, given an array of BlockRecord, creating visible_blocks
and accessing visible_blocks.blocks yields a copy of the initial array.
Also, trying to set the blocks property should raise an exception.'

def test_blocks_property(self):

    expected_blocks = BlockRecordList.from_list([self.record_a, self.record_b], self.course_key)
    visible_blocks = self._create_block_record_list(expected_blocks)
    self.assertEqual(expected_blocks, visible_blocks.blocks)
    with self.assertRaises(AttributeError):
        visible_blocks.blocks = expected_blocks
