Exemple #1
0
 def test_repr(self):
     my_dict = AttrDict()
     my_dict['test'] = 123
     my_dict.python = 42
     self.assertEqual(repr(my_dict), "{'test': 123, 'python': 42}")
Exemple #2
0
 def test_len_should_work_like_in_dict(self):
     my_dict = AttrDict()
     my_dict['test'] = 123
     my_dict.python = 42
     self.assertEqual(len(my_dict), 2)