def test_fad_init(self): fad = FixedAttrsDict(MagicMock(), properties={'a': 1, 'b': 2}) # getting a non-existing attribute is handled correctly with self.assertRaises(AttributeError): fad.a = 2 # non-existing attribute access is handled correctly with self.assertRaises(AttributeError): fad.foo