예제 #1
0
 def test_complex(self):
     source = {
         'typename': '%s.%s' % (Tester.__module__, Tester.__name__),
         'foo': {'datatype': RecurseTest, 'foo': 'bar', 'color': 'red'},
         'bing': 'bang',
     }
     expected = {
         'datatype': Tester,
         'foo': {'datatype': RecurseTest, 'foo': 'bar', 'color': COLORS.Red},
         'bing': 'post-bang',
     }
     actual = recurse.recurse(source, post='post_recursion')
     self.assertEqual(expected, actual)
예제 #2
0
 def test_complex(self):
     source = {
         'typename': '%s.%s' % (Tester.__module__, Tester.__name__),
         'foo': {
             'datatype': RecurseTest,
             'foo': 'bar',
             'color': 'red'
         },
         'bing': 'bang',
     }
     expected = {
         'datatype': Tester,
         'foo': {
             'datatype': RecurseTest,
             'foo': 'bar',
             'color': COLORS.Red
         },
         'bing': 'post-bang',
     }
     actual = recurse.recurse(source, post='post_recursion')
     self.assertEqual(expected, actual)
예제 #3
0
 def test_simple(self):
     source = {'datatype': RecurseTest, 'foo': 'bar', 'color': 'red'}
     expected = {'datatype': RecurseTest, 'foo': 'bar', 'color': COLORS.Red}
     actual = recurse.recurse(source, post='post_recursion')
     self.assertEqual(expected, actual)
예제 #4
0
 def test_trivial(self):
     self.assertEqual(recurse.recurse({'a': {}}), {'a': {}})
예제 #5
0
 def test_empty(self):
     self.assertEqual(recurse.recurse({}), {})
예제 #6
0
 def test_simple(self):
     source = {'datatype': RecurseTest, 'foo': 'bar', 'color': 'red'}
     expected = {'datatype': RecurseTest, 'foo': 'bar', 'color': COLORS.Red}
     actual = recurse.recurse(source, post='post_recursion')
     self.assertEqual(expected, actual)
예제 #7
0
 def test_trivial(self):
     self.assertEqual(recurse.recurse({'a': {}}), {'a': {}})
예제 #8
0
 def test_empty(self):
     self.assertEqual(recurse.recurse({}), {})