Пример #1
0
 def test_get_details(self):
     """Assert we handle valid JSON and other values."""
     actual_string_arg = form.get_details('cool')
     expected_string_arg = 'cool'
     self.assertEqual(actual_string_arg, expected_string_arg)
     actual_json_arg = form.get_details(json.dumps({'a': 'b', 'c': False}))
     expected_json_arg = '<li>a: b</li><li>c: false</li>'
     self.assertEqual(actual_json_arg, expected_json_arg)
Пример #2
0
 def test_get_details(self):
     """Assert we handle valid dict and other values."""
     actual_string_arg = form.get_details('cool')
     expected_string_arg = '<li>cool</li>'
     self.assertEqual(actual_string_arg, expected_string_arg)
     actual_dict_arg = form.get_details({'a': 'b', 'c': False})
     expected_dict_arg = '<li>a: b</li><li>c: false</li>'
     self.assertEqual(actual_dict_arg, expected_dict_arg)
Пример #3
0
 def test_get_details(self):
     """Assert we handle valid dict and other values."""
     actual_string_arg = form.get_details('cool')
     expected_string_arg = '<li>cool</li>'
     self.assertEqual(actual_string_arg, expected_string_arg)
     actual_dict_arg = form.get_details({'a': 'b', 'c': False})
     expected_dict_arg = '<li>a: b</li><li>c: false</li>'
     self.assertEqual(actual_dict_arg, expected_dict_arg)