Merge "Python 3: Fix YamlEnvironmentTest tests"

This commit is contained in:
Jenkins 2014-03-24 04:56:46 +00:00 committed by Gerrit Code Review
commit cd4debc0ad

View file

@ -52,14 +52,14 @@ parameters: }
def test_parse_string_environment(self):
env = 'just string'
expect = 'The environment is not a valid YAML mapping data type.'
msg = self.assertRaises(ValueError, environment_format.parse, env)
self.assertIn(expect, msg)
e = self.assertRaises(ValueError, environment_format.parse, env)
self.assertIn(expect, str(e))
def test_parse_document(self):
env = '["foo" , "bar"]'
expect = 'The environment is not a valid YAML mapping data type.'
msg = self.assertRaises(ValueError, environment_format.parse, env)
self.assertIn(expect, msg)
e = self.assertRaises(ValueError, environment_format.parse, env)
self.assertIn(expect, str(e))
class YamlParseExceptions(testtools.TestCase):