Ejemplo n.º 1
0
 def test_application_todict_dict_with_obj(self):
     MyObject = namedtuple('MyObject', 'a b')
     mo = MyObject('x', 'y')
     the_input = {'a': mo}
     actual = Application.todict(the_input)
     expected = {'a': {'a': 'x', 'b': 'y'}}
     self.assertEqual(actual, expected)
Ejemplo n.º 2
0
 def test_application_todict_dict_with_obj(self):
     MyObject = namedtuple('MyObject', 'a b')
     mo = MyObject('x', 'y')
     the_input = {'a': mo}
     actual = Application.todict(the_input)
     expected = {'a': {'a': 'x', 'b': 'y'}}
     self.assertEqual(actual, expected)
Ejemplo n.º 3
0
 def test_application_todict_list(self):
     the_input = [{'a': 'b'}]
     actual = Application.todict(the_input)
     expected = [{'a': 'b'}]
     self.assertEqual(actual, expected)
Ejemplo n.º 4
0
 def test_application_todict_dict(self):
     the_input = {'a': 'b'}
     actual = Application.todict(the_input)
     expected = {'a': 'b'}
     self.assertEqual(actual, expected)
Ejemplo n.º 5
0
 def test_application_todict_none(self):
     the_input = None
     actual = Application.todict(the_input)
     expected = None
     self.assertEqual(actual, expected)
Ejemplo n.º 6
0
 def test_application_todict_list(self):
     the_input = [{'a': 'b'}]
     actual = Application.todict(the_input)
     expected = [{'a': 'b'}]
     self.assertEqual(actual, expected)
Ejemplo n.º 7
0
 def test_application_todict_dict(self):
     the_input = {'a': 'b'}
     actual = Application.todict(the_input)
     expected = {'a': 'b'}
     self.assertEqual(actual, expected)
Ejemplo n.º 8
0
 def test_application_todict_none(self):
     the_input = None
     actual = Application.todict(the_input)
     expected = None
     self.assertEqual(actual, expected)