mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-05 03:38:12 +08:00
Fix typo
This commit is contained in:
@@ -586,7 +586,7 @@ class Config(object):
|
||||
|
||||
def _setifok_rebuild_strategy(self, strategy):
|
||||
if strategy not in SUPPORTED_STRATEGIES:
|
||||
raise ValueError('The strategy "{0}" is not supported. Chose from: {1}'
|
||||
raise ValueError('The strategy "{0}" is not supported. Choose from: {1}'
|
||||
.format(strategy, ', '.join(SUPPORTED_STRATEGIES)))
|
||||
self._rebuild_strategy = strategy
|
||||
|
||||
|
||||
@@ -233,7 +233,7 @@ class ModuleBuild(MBSBase):
|
||||
def validate_rebuild_stategy(self, key, rebuild_strategy):
|
||||
if rebuild_strategy not in self.rebuild_strategies.keys():
|
||||
choices = ', '.join(self.rebuild_strategies.keys())
|
||||
raise ValueError('The rebuild_strategy of "{0}" is invalid. Chose from: {1}'
|
||||
raise ValueError('The rebuild_strategy of "{0}" is invalid. Choose from: {1}'
|
||||
.format(rebuild_strategy, choices))
|
||||
return rebuild_strategy
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ class BaseHandler(object):
|
||||
if 'rebuild_strategy' in self.data:
|
||||
if self.data['rebuild_strategy'] not in conf.rebuild_strategies_allowed:
|
||||
raise ValidationError(
|
||||
'The rebuild method of "{0}" is not allowed. Chose from: {1}.'
|
||||
'The rebuild method of "{0}" is not allowed. Choose from: {1}.'
|
||||
.format(self.data['rebuild_strategy'],
|
||||
', '.join(conf.rebuild_strategies_allowed)))
|
||||
|
||||
|
||||
@@ -538,7 +538,7 @@ class TestViews(unittest.TestCase):
|
||||
self.assertEqual(rv.status_code, 400)
|
||||
expected_error = {
|
||||
'error': 'Bad Request',
|
||||
'message': ('The rebuild method of "only-changed" is not allowed. Chose from: all.'),
|
||||
'message': ('The rebuild method of "only-changed" is not allowed. Choose from: all.'),
|
||||
'status': 400
|
||||
}
|
||||
self.assertEqual(data, expected_error)
|
||||
|
||||
Reference in New Issue
Block a user