Ejemplo n.º 1
0
 def test_interpolate_types(self):
     e = Exports({
         'alpha': {
             'one': 1,
             'two': 2
         },
         'beta': [1, 2]
     }, SETTINGS, '')
     r = {'alpha': {'one': 1, 'two': 2}, 'beta': [1, 2]}
     self.assertIs(type(e.as_dict()['alpha']), ParameterDict)
     self.assertIs(type(e.as_dict()['beta']), ParameterList)
     e.interpolate()
     self.assertIs(type(e.as_dict()['alpha']), dict)
     self.assertIs(type(e.as_dict()['beta']), list)
     self.assertEqual(e.as_dict(), r)
Ejemplo n.º 2
0
 def test_overwrite_method(self):
     e = Exports({'alpha': {'one': 1, 'two': 2}}, SETTINGS, '')
     d = {'alpha': {'three': 3, 'four': 4}}
     e.overwrite(d)
     e.interpolate()
     self.assertEqual(e.as_dict(), d)