mirror of
https://opendev.org/openstack/python-heatclient.git
synced 2026-01-17 07:10:29 +00:00
Merge "Python 3: Fix YamlEnvironmentTest tests"
This commit is contained in:
commit
cd4debc0ad
1 changed files with 4 additions and 4 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue