Пример #1
0
 def test_from_file2(self):
     path = os.path.join(self.DATA, 'wddx2.xml')
     data = wddx.load(path)
     expected =  [{
         'a': [10, 'second element'],
         'b': True,
         'd': datetime.datetime(1998, 6, 12, 4, 32, 12),
         'n': -12.456,
         'obj': {'n': -12.456, 's': 'a string',},
         's': 'a string',
     }]
Пример #2
0
 def test_from_file(self):
     path = os.path.join(self.DATA, 'wddx.xml')
     data = wddx.load(path)
     expected = [{
         'carton_size': '12',
         'category': 'items',
         'full_name': 'Magirita coupe',
         'id': '311',
         'is_valid': 't',
         'long_desc': None,
         'name': '8429',
         'photo': '/uploaded/item/1039133948.jpg',
         'php_class_name': 'blue_item',
         'price': '5.91',
         'short_desc': '266ml margarita glass',
         'sub_cat': None,
         'sub_sub_cat': None,
         'thumbnail': '/uploaded/item/tn_1039133948.jpg',
     }]
     self.assertEqual(data, expected)