Beispiel #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)
 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)
Beispiel #3
0
 def test_application_todict_list(self):
     the_input = [{'a': 'b'}]
     actual = Application.todict(the_input)
     expected = [{'a': 'b'}]
     self.assertEqual(actual, expected)
Beispiel #4
0
 def test_application_todict_dict(self):
     the_input = {'a': 'b'}
     actual = Application.todict(the_input)
     expected = {'a': 'b'}
     self.assertEqual(actual, expected)
Beispiel #5
0
 def test_application_todict_none(self):
     the_input = None
     actual = Application.todict(the_input)
     expected = None
     self.assertEqual(actual, expected)
 def test_application_todict_list(self):
     the_input = [{'a': 'b'}]
     actual = Application.todict(the_input)
     expected = [{'a': 'b'}]
     self.assertEqual(actual, expected)
 def test_application_todict_dict(self):
     the_input = {'a': 'b'}
     actual = Application.todict(the_input)
     expected = {'a': 'b'}
     self.assertEqual(actual, expected)
 def test_application_todict_none(self):
     the_input = None
     actual = Application.todict(the_input)
     expected = None
     self.assertEqual(actual, expected)