Exemple #1
0
 def test_many_methods(self):
     self.assertEqual(
         configparser.parse_method_spec('* GET, HEAD:'),
         ['GET', 'HEAD']
     )
Exemple #2
0
 def test_raises_SyntaxError_if_no_match(self):
     with self.assertRaises(SyntaxError) as assertion:
         configparser.parse_method_spec('foo;bar:')
     self.assertEqual(
         str(assertion.exception), 'expecting method spec')
Exemple #3
0
 def test_single_method(self):
     self.assertEqual(
         configparser.parse_method_spec('* GET:'),
         ['GET']
     )