コード例 #1
0
ファイル: test_configparser.py プロジェクト: dhain/potpy
 def test_many_methods(self):
     self.assertEqual(
         configparser.parse_method_spec('* GET, HEAD:'),
         ['GET', 'HEAD']
     )
コード例 #2
0
ファイル: test_configparser.py プロジェクト: dhain/potpy
 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')
コード例 #3
0
ファイル: test_configparser.py プロジェクト: dhain/potpy
 def test_single_method(self):
     self.assertEqual(
         configparser.parse_method_spec('* GET:'),
         ['GET']
     )