Merge "Update hacking version"

This commit is contained in:
Zuul 2019-01-15 01:05:29 +00:00 committed by Gerrit Code Review
commit 3b3734499b
2 changed files with 14 additions and 14 deletions

View File

@ -58,18 +58,18 @@ class TestWarnings(base.TestCase):
def test_missing_field(self): def test_missing_field(self):
"""Warning when missing type field in parameter file.""" """Warning when missing type field in parameter file."""
self.assertIn( self.assertIn(
("WARNING: Failure on key: name, values: " ("WARNING: Failure on key: name, values: " +
+ "OrderedDict([('description'," "OrderedDict([('description'," +
+ " 'name_1 is missing type field.\\n'), ('in', 'body')," " 'name_1 is missing type field.\\n'), ('in', 'body')," +
+ " ('required', True)]). " " ('required', True)]). " +
+ "'NoneType' object has no attribute 'split'"), "'NoneType' object has no attribute 'split'"),
self.warning) self.warning)
def test_invalid_parameter_definition(self): def test_invalid_parameter_definition(self):
"""Warning when parameter definition is invalid.""" """Warning when parameter definition is invalid."""
self.assertIn( self.assertIn(
("WARNING: Invalid parameter definition ``invalid_name``. " ("WARNING: Invalid parameter definition ``invalid_name``. " +
+ "Expected format: ``name: reference``. "), "Expected format: ``name: reference``. "),
self.warning) self.warning)
def test_empty_parameter_file(self): def test_empty_parameter_file(self):
@ -81,21 +81,21 @@ class TestWarnings(base.TestCase):
def test_no_parameters_set(self): def test_no_parameters_set(self):
"""Error when parameters are not set in rest_parameters stanza.""" """Error when parameters are not set in rest_parameters stanza."""
self.assertIn( self.assertIn(
("No parameters defined\n\n.." ("No parameters defined\n\n.." +
+ " rest_parameters:: parameters.yaml"), " rest_parameters:: parameters.yaml"),
self.warning) self.warning)
def test_parameter_file_not_exist(self): def test_parameter_file_not_exist(self):
"""Error when parameter file does not exist""" """Error when parameter file does not exist"""
self.assertIn( self.assertIn(
("No parameters defined\n\n.." ("No parameters defined\n\n.." +
+ " rest_parameters:: no_parameters.yaml"), " rest_parameters:: no_parameters.yaml"),
self.warning) self.warning)
def test_missing_path_parameter_in_stanza(self): def test_missing_path_parameter_in_stanza(self):
"""Warning when path param not found in rest_parameter stanza.""" """Warning when path param not found in rest_parameter stanza."""
self.assertIn( self.assertIn(
("WARNING: No path parameter ``b_id`` found in" ("WARNING: No path parameter ``b_id`` found in" +
+ " rest_parameter stanza.\n"), " rest_parameter stanza.\n"),
self.warning) self.warning)

View File

@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration # of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later. # process, which may cause wedges in the gate later.
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 hacking>=1.1.0,<1.2.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0
python-subunit>=1.0.0 # Apache-2.0/BSD python-subunit>=1.0.0 # Apache-2.0/BSD