'Ensure that dictionary-style field access works properly.'

def test_dictionary_access(self):

    person = self.Person(name='Test    User', age=30, job=self.Job())
    self.assertEqual(person['name'], 'Test    User')
    self.assertRaises(KeyError, person.__getitem__, 'salary')
    self.assertRaises(KeyError, person.__setitem__, 'salary', 50)
    person['name'] = 'Another    User'
    self.assertEqual(person['name'], 'Another    User')
    self.assertEqual(len(person), 5)
    self.assertTrue(('age' in person))
    person.age = None
    self.assertFalse(('age' in person))
    self.assertFalse(('nationality' in person))
