Esempio n. 1
0
 def _generate_test(data, path, expected):
     if hasattr(expected, '__call__'):
         return lambda self: self.assertTrue(
             expected(resolve(data, path, default=None)))
     else:
         return lambda self: self.assertEqual(
             resolve(data, path, default=None), expected)
Esempio n. 2
0
 def _generate_test(data, path, expected):
     if hasattr(expected, '__call__'):
         return lambda self: self.assertTrue(expected(resolve(data, path, default=None)))
     else:
         return lambda self: self.assertEqual(resolve(data, path, default=None), expected)
Esempio n. 3
0
 def _generate_test(data, path, expected):
     return lambda self: self.assertRaises(expected, lambda: resolve(data, path))
Esempio n. 4
0
 def _generate_test(data, path, expected):
     return lambda self: self.assertRaises(expected, lambda: resolve(
         data, path))