* Fix TestJsonPath.test_hyphen_key on Python 2.6

- Changed assertRaises in TestJsonPath.test_hyphen_key to 2.6
  unittest syntax.
This commit is contained in:
José Manuel Fardello 2013-08-25 14:55:05 +02:00
parent 409b3d0a3c
commit f02155b629
1 changed files with 2 additions and 2 deletions

View File

@ -166,8 +166,8 @@ class TestJsonPath(unittest.TestCase):
self.check_cases([('foo.bar-baz', {'foo': {'bar-baz': 3}}, [3]),
('foo.[bar-baz,blah-blah]', {'foo': {'bar-baz': 3, 'blah-blah':5}},
[3,5])])
with self.assertRaises(JsonPathLexerError):
self.check_cases([('foo.-baz', {'foo': {'-baz': 8}}, [8])])
self.assertRaises(JsonPathLexerError, self.check_cases,
[('foo.-baz', {'foo': {'-baz': 8}}, [8])])