def test_load_attr_on_invalid_name(self): info = Info({'1': 1}, preserve_data=True) info._load_attr('1') self.assertEqual(info['1'], 1)
def test_load_attr_on_missing_key(self): info = Info({}, preserve_data=True) info._load_attr('test') self.assertEqual(info.test, None)
def test_load_attr(self): info = Info({'test': 'test'}, preserve_data=True) info._load_attr('test') self.assertEqual(info.test, 'test')