Пример #1
0
 def test_load_attr_on_invalid_name(self):
     info = Info({'1': 1}, preserve_data=True)
     info._load_attr('1')
     self.assertEqual(info['1'], 1)
Пример #2
0
 def test_load_attr_on_missing_key(self):
     info = Info({}, preserve_data=True)
     info._load_attr('test')
     self.assertEqual(info.test, None)
Пример #3
0
 def test_load_attr(self):
     info = Info({'test': 'test'}, preserve_data=True)
     info._load_attr('test')
     self.assertEqual(info.test, 'test')
Пример #4
0
 def test_load_attr_on_invalid_name(self):
     info = Info({'1': 1}, preserve_data=True)
     info._load_attr('1')
     self.assertEqual(info['1'], 1)
Пример #5
0
 def test_load_attr_on_missing_key(self):
     info = Info({}, preserve_data=True)
     info._load_attr('test')
     self.assertEqual(info.test, None)
Пример #6
0
 def test_load_attr(self):
     info = Info({'test': 'test'}, preserve_data=True)
     info._load_attr('test')
     self.assertEqual(info.test, 'test')