'Ensure that a frozendict is immutable.'

def test_frozendict_immutable(self):

    vals = {'name': 'Joe', 'age': 42}
    frozen_vals = frozendict(vals)
    with self.assertRaises(Exception):
        frozen_vals['surname'] = 'Jack'
    with self.assertRaises(Exception):
        frozen_vals['name'] = 'Jack'
    with self.assertRaises(Exception):
        del frozen_vals['name']
    with self.assertRaises(Exception):
        frozen_vals.update({'surname': 'Jack'})
    with self.assertRaises(Exception):
        frozen_vals.update({'name': 'Jack'})
    with self.assertRaises(Exception):
        frozen_vals.setdefault('surname', 'Jack')
    with self.assertRaises(Exception):
        frozen_vals.pop('surname', 'Jack')
    with self.assertRaises(Exception):
        frozen_vals.pop('name', 'Jack')
    with self.assertRaises(Exception):
        frozen_vals.popitem()
    with self.assertRaises(Exception):
        frozen_vals.clear()
