Exemple #1
0
 def test_parse_route_params_str_no_parameter(self):
     test_value = 'no parameter given'
     expected = ''
     self.assertEqual(expected, ask.parse_route_params_str(test_value))
Exemple #2
0
 def test_parse_route_params_str_empty_string(self):
     test_value = ''
     expected = ''
     self.assertEqual(expected, ask.parse_route_params_str(test_value))
Exemple #3
0
 def test_parse_route_params_str_param_in_param(self):
     test_value = '<par<param>ram>'
     expected = 'param'
     self.assertEqual(expected, ask.parse_route_params_str(test_value))
Exemple #4
0
 def test_parse_route_params_str_closed_not_opened(self):
     test_value = 'param>'
     expected = ''
     self.assertEqual(expected, ask.parse_route_params_str(test_value))
Exemple #5
0
 def test_parse_route_params_str_param_with_line_break(self):
     test_value = 'string and <param\n>'
     expected = 'param'
     self.assertEqual(expected, ask.parse_route_params_str(test_value))
Exemple #6
0
 def test_parse_route_params_str_two_parameters(self):
     test_value = '<param1> and <param2>'
     expected = 'param1, param2'
     self.assertEqual(expected, ask.parse_route_params_str(test_value))