def test_dotdict_builtin_error(self): # Ensures that you can not override the builtin methods base = DotDict() with self.assertRaises(AttributeError): base.pop = "shouldnt work" with self.assertRaises(AttributeError): base.__getitem__ = "really shouldnt work" with self.assertRaises(AttributeError): base.another.chained.pop = "again should not work"
def test_dotdict_builtin_error(self): # Ensures that you can not override the builtin methods base = DotDict() with self.assertRaises(AttributeError): base.pop = 'shouldnt work' with self.assertRaises(AttributeError): base.__getitem__ = 'really shouldnt work' with self.assertRaises(AttributeError): base.another.chained.pop = 'again should not work'