Merge "ensure the independent series always shows up in the status set"
This commit is contained in:
commit
796f75dcf8
@ -57,6 +57,13 @@ class SeriesStatus(collections.abc.Mapping):
|
||||
def __init__(self, raw_data):
|
||||
self._raw_data = raw_data
|
||||
self._data = self._organize_data(raw_data)
|
||||
# Ensure there is always an independent series.
|
||||
if 'independent' not in self._data:
|
||||
self._data['independent'] = Series({
|
||||
'name': 'independent',
|
||||
'status': 'development',
|
||||
'initial-release': None,
|
||||
})
|
||||
|
||||
@classmethod
|
||||
def from_directory(cls, root_dir):
|
||||
|
@ -59,6 +59,11 @@ class TestConstructSeriesStatus(base.BaseTestCase):
|
||||
status = series_status.SeriesStatus.from_directory(self.tmpdir)
|
||||
self.assertIn('rocky', status)
|
||||
|
||||
def test_independent_series(self):
|
||||
data = yamlutils.loads(self._body)
|
||||
status = series_status.SeriesStatus(data)
|
||||
self.assertIn('independent', status)
|
||||
|
||||
|
||||
class TestSeries(base.BaseTestCase):
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user