use yamlutils.loads() everywhere instead of yaml.safe_load()

Also set the encoding for the data files in more open() calls.

Change-Id: Idda3a7ab46e5478f83541fbbb629d7e086515ffd
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2017-08-01 17:17:29 -04:00
parent 1a1b79467f
commit ee1fc3d892
15 changed files with 69 additions and 81 deletions

View File

@ -26,13 +26,12 @@ import os.path
import shutil import shutil
import tempfile import tempfile
import yaml
# Disable warnings about insecure connections. # Disable warnings about insecure connections.
from requests.packages import urllib3 from requests.packages import urllib3
from openstack_releases import defaults from openstack_releases import defaults
from openstack_releases import gitutils from openstack_releases import gitutils
from openstack_releases import yamlutils
urllib3.disable_warnings() urllib3.disable_warnings()
@ -83,7 +82,7 @@ def main():
print("File was deleted, skipping.") print("File was deleted, skipping.")
continue continue
with open(filename, 'r') as f: with open(filename, 'r') as f:
deliverable_info = yaml.load(f.read()) deliverable_info = yamlutils.loads(f.read())
branch = 'stable/' + args.prev_series branch = 'stable/' + args.prev_series

View File

@ -18,8 +18,6 @@ import argparse
from openstack_releases import yamlutils from openstack_releases import yamlutils
import yaml
def release_notes(args, series, deliverable_info): def release_notes(args, series, deliverable_info):
deliverable_info['release-notes'] = args.url deliverable_info['release-notes'] = args.url
@ -41,7 +39,7 @@ def get_deliverable_data(series, deliverable):
deliverable_filename = 'deliverables/%s/%s.yaml' % ( deliverable_filename = 'deliverables/%s/%s.yaml' % (
series, deliverable) series, deliverable)
with open(deliverable_filename, 'r', encoding='utf-8') as f: with open(deliverable_filename, 'r', encoding='utf-8') as f:
return yaml.safe_load(f) return yamlutils.loads(f.read())
def main(): def main():

View File

@ -27,11 +27,10 @@ import subprocess
import sys import sys
import tempfile import tempfile
import yaml
from openstack_releases import defaults from openstack_releases import defaults
from openstack_releases import gitutils from openstack_releases import gitutils
from openstack_releases import governance from openstack_releases import governance
from openstack_releases import yamlutils
def header(title): def header(title):
@ -161,8 +160,8 @@ def main():
continue continue
print('\n' + ('=' * 80)) print('\n' + ('=' * 80))
print('\nChecking %s\n' % filename) print('\nChecking %s\n' % filename)
with open(filename, 'r') as f: with open(filename, 'r', encoding='utf-8') as f:
deliverable_info = yaml.load(f.read()) deliverable_info = yamlutils.loads(f.read())
series = os.path.basename( series = os.path.basename(
os.path.dirname( os.path.dirname(

View File

@ -22,7 +22,7 @@ import glob
import os import os
import os.path import os.path
import yaml from openstack_releases import yamlutils
def main(): def main():
@ -39,8 +39,8 @@ def main():
return 1 return 1
for filename in filenames: for filename in filenames:
with open(filename, 'r') as f: with open(filename, 'r', encoding='utf-8') as f:
deliverable_info = yaml.load(f.read()) deliverable_info = yamlutils.loads(f.read())
deliverable_name = os.path.splitext(os.path.basename(filename))[0] deliverable_name = os.path.splitext(os.path.basename(filename))[0]

View File

@ -17,8 +17,7 @@ import datetime
import os.path import os.path
import openstack_releases import openstack_releases
from openstack_releases import yamlutils
import yaml
def main(): def main():
@ -45,7 +44,7 @@ def main():
)) ))
with open(schedule_filename, 'r') as f: with open(schedule_filename, 'r') as f:
schedule_data = yaml.safe_load(f) schedule_data = yamlutils.loads(f.read())
print('Release Team Calendar for {}\n'.format(series.title())) print('Release Team Calendar for {}\n'.format(series.title()))

View File

@ -23,14 +23,13 @@ import glob
import os import os
import os.path import os.path
import yaml
# Disable warnings about insecure connections. # Disable warnings about insecure connections.
from requests.packages import urllib3 from requests.packages import urllib3
from openstack_releases import defaults from openstack_releases import defaults
from openstack_releases import gitutils from openstack_releases import gitutils
from openstack_releases import links from openstack_releases import links
from openstack_releases import yamlutils
urllib3.disable_warnings() urllib3.disable_warnings()
@ -79,8 +78,8 @@ def main():
if not os.path.exists(filename): if not os.path.exists(filename):
print("File was deleted, skipping.") print("File was deleted, skipping.")
continue continue
with open(filename, 'r') as f: with open(filename, 'r', encoding='utf-8') as f:
deliverable_info = yaml.load(f.read()) deliverable_info = yamlutils.loads(f.read())
link_mode = deliverable_info.get('artifact-link-mode', 'tarball') link_mode = deliverable_info.get('artifact-link-mode', 'tarball')

View File

@ -23,14 +23,12 @@ import tempfile
from openstack_releases import gitutils from openstack_releases import gitutils
from openstack_releases import yamlutils from openstack_releases import yamlutils
import yaml
def get_deliverable_data(series, deliverable): def get_deliverable_data(series, deliverable):
deliverable_filename = 'deliverables/%s/%s.yaml' % ( deliverable_filename = 'deliverables/%s/%s.yaml' % (
series, deliverable) series, deliverable)
with open(deliverable_filename, 'r') as f: with open(deliverable_filename, 'r', encoding='utf-8') as f:
return yaml.safe_load(f) return yamlutils.loads(f.read())
def main(): def main():

View File

@ -22,8 +22,6 @@ import re
import shutil import shutil
import tempfile import tempfile
import yaml
import openstack_releases import openstack_releases
from openstack_releases import gitutils from openstack_releases import gitutils
from openstack_releases import governance from openstack_releases import governance
@ -146,7 +144,7 @@ def main():
verbose('\n{}'.format(filename)) verbose('\n{}'.format(filename))
deliverable_name = os.path.basename(filename)[:-5] deliverable_name = os.path.basename(filename)[:-5]
with open(filename, 'r', encoding='utf-8') as f: with open(filename, 'r', encoding='utf-8') as f:
deliverable_data = yaml.safe_load(f) deliverable_data = yamlutils.loads(f.read())
releases = deliverable_data.get('releases') releases = deliverable_data.get('releases')
if not releases: if not releases:
verbose('# no releases') verbose('# no releases')

View File

@ -21,10 +21,9 @@ import os.path
import shutil import shutil
import tempfile import tempfile
import yaml
import openstack_releases import openstack_releases
from openstack_releases import defaults from openstack_releases import defaults
from openstack_releases import yamlutils
BRANCH_TEMPLATE = """ BRANCH_TEMPLATE = """
@ -104,8 +103,8 @@ def main():
deliverable_name = os.path.basename(filename)[:-5] deliverable_name = os.path.basename(filename)[:-5]
if args.deliverable and deliverable_name not in args.deliverable: if args.deliverable and deliverable_name not in args.deliverable:
continue continue
with open(filename, 'r') as f: with open(filename, 'r', encoding='utf-8') as f:
deliverable_data = yaml.safe_load(f) deliverable_data = yamlutils.loads(f.read())
if deliverable_data['type'] != 'library': if deliverable_data['type'] != 'library':
continue continue
verbose('\n{}'.format(filename)) verbose('\n{}'.format(filename))

View File

@ -31,7 +31,6 @@ import tempfile
import jsonschema import jsonschema
import requests import requests
import six import six
import yaml
# Disable warnings about insecure connections. # Disable warnings about insecure connections.
from requests.packages import urllib3 from requests.packages import urllib3
@ -44,6 +43,7 @@ from openstack_releases import project_config
from openstack_releases import puppetutils from openstack_releases import puppetutils
from openstack_releases import pythonutils from openstack_releases import pythonutils
from openstack_releases import versionutils from openstack_releases import versionutils
from openstack_releases import yamlutils
urllib3.disable_warnings() urllib3.disable_warnings()
@ -90,7 +90,7 @@ _NO_STABLE_BRANCH_CHECK = set([
]) ])
_PLEASE = ('It is too expensive to determine this value during ' _PLEASE = ('It is too expensive to determine this value during '
'the site build, please set it explicitly.') 'the site build, please set it explicitly.')
_SCHEMA = yaml.load( _SCHEMA = yamlutils.loads(
pkgutil.get_data('openstack_releases', 'schema.yaml').decode('utf-8') pkgutil.get_data('openstack_releases', 'schema.yaml').decode('utf-8')
) )
@ -141,8 +141,8 @@ def validate_series_open(deliverable_info,
os.path.dirname(previous_deliverable_file) os.path.dirname(previous_deliverable_file)
) )
expected_branch = 'stable/' + previous_series expected_branch = 'stable/' + previous_series
with open(previous_deliverable_file, 'r') as f: with open(previous_deliverable_file, 'r', encoding='utf-8') as f:
previous_deliverable = yaml.load(f.read()) previous_deliverable = yamlutils.loads(f.read())
if not previous_deliverable: if not previous_deliverable:
# An empty file results in None, so convert to dict to # An empty file results in None, so convert to dict to
# make using the value easier. # make using the value easier.
@ -822,8 +822,8 @@ def main():
if not os.path.isfile(filename): if not os.path.isfile(filename):
print("File was deleted, skipping.") print("File was deleted, skipping.")
continue continue
with open(filename, 'r') as f: with open(filename, 'r', encoding='utf-8') as f:
deliverable_info = yaml.load(f.read()) deliverable_info = yamlutils.loads(f.read())
series_name = os.path.basename( series_name = os.path.basename(
os.path.dirname(filename) os.path.dirname(filename)

View File

@ -20,9 +20,9 @@ import glob
import os import os
import pbr.version import pbr.version
import yaml
from openstack_releases import governance from openstack_releases import governance
from openstack_releases import yamlutils
def _safe_semver(v): def _safe_semver(v):
@ -122,8 +122,8 @@ class Deliverables(object):
for filename in sorted(deliverable_files): for filename in sorted(deliverable_files):
series = self._series_from_filename(filename) series = self._series_from_filename(filename)
deliverable = self._deliverable_from_filename(filename) deliverable = self._deliverable_from_filename(filename)
with open(filename, 'r') as f: with open(filename, 'r', encoding='utf-8') as f:
d_info = yaml.load(f.read()) d_info = yamlutils.loads(f.read())
if self._collapse_history: if self._collapse_history:
_collapse_deliverable_history(deliverable, d_info) _collapse_deliverable_history(deliverable, d_info)
team = d_info['team'] team = d_info['team']

View File

@ -16,9 +16,9 @@
import weakref import weakref
from openstack_releases import wiki from openstack_releases import wiki
from openstack_releases import yamlutils
import requests import requests
import yaml
PROJECTS_LIST = "http://git.openstack.org/cgit/openstack/governance/plain/reference/projects.yaml" # noqa PROJECTS_LIST = "http://git.openstack.org/cgit/openstack/governance/plain/reference/projects.yaml" # noqa
@ -32,7 +32,7 @@ def get_team_data(url=PROJECTS_LIST):
""" """
r = requests.get(url) r = requests.get(url)
return yaml.load(r.text) return yamlutils.loads(r.text)
def get_tags_for_deliverable(team_data, team, name): def get_tags_for_deliverable(team_data, team, name):

View File

@ -14,9 +14,9 @@
""" """
import requests import requests
import yaml
from openstack_releases import flags from openstack_releases import flags
from openstack_releases import yamlutils
ZUUL_LAYOUT_URL = 'http://git.openstack.org/cgit/openstack-infra/project-config/plain/zuul/layout.yaml' # noqa ZUUL_LAYOUT_URL = 'http://git.openstack.org/cgit/openstack-infra/project-config/plain/zuul/layout.yaml' # noqa
@ -36,7 +36,7 @@ def get_zuul_layout_data(url=ZUUL_LAYOUT_URL):
""" """
r = requests.get(url) r = requests.get(url)
raw = yaml.safe_load(r.text) raw = yamlutils.loads(r.text)
# Add a mapping from repo name to repo settings, since that is how # Add a mapping from repo name to repo settings, since that is how
# we access this most often. # we access this most often.
raw[_VALIDATE_KEY] = { raw[_VALIDATE_KEY] = {

View File

@ -15,8 +15,7 @@
from oslotest import base from oslotest import base
from openstack_releases import governance from openstack_releases import governance
from openstack_releases import yamlutils
import yaml
_team_data_yaml = """ _team_data_yaml = """
@ -57,7 +56,7 @@ Release Management:
- openstack-dev/specs-cookiecutter - openstack-dev/specs-cookiecutter
""" """
TEAM_DATA = yaml.load(_team_data_yaml) TEAM_DATA = yamlutils.loads(_team_data_yaml)
class TestGetRepoOwner(base.BaseTestCase): class TestGetRepoOwner(base.BaseTestCase):

View File

@ -20,10 +20,10 @@ import textwrap
import fixtures import fixtures
import mock import mock
from oslotest import base from oslotest import base
import yaml
from openstack_releases import defaults from openstack_releases import defaults
from openstack_releases.cmds import validate from openstack_releases.cmds import validate
from openstack_releases import yamlutils
class TestValidateBugTracker(base.BaseTestCase): class TestValidateBugTracker(base.BaseTestCase):
@ -1031,7 +1031,7 @@ class TestValidateNewReleases(base.BaseTestCase):
- openstack-dev/specs-cookiecutter - openstack-dev/specs-cookiecutter
""") """)
team_data = yaml.load(team_data_yaml) team_data = yamlutils.loads(team_data_yaml)
def test_all_repos(self): def test_all_repos(self):
deliverable_info = { deliverable_info = {
@ -1154,7 +1154,7 @@ class TestValidateStableBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_stable_branches( validate.validate_stable_branches(
deliverable_info, deliverable_info,
'ocata', 'ocata',
@ -1177,7 +1177,7 @@ class TestValidateStableBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_stable_branches( validate.validate_stable_branches(
deliverable_info, deliverable_info,
'ocata', 'ocata',
@ -1200,7 +1200,7 @@ class TestValidateStableBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_stable_branches( validate.validate_stable_branches(
deliverable_info, deliverable_info,
'ocata', 'ocata',
@ -1223,7 +1223,7 @@ class TestValidateStableBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_stable_branches( validate.validate_stable_branches(
deliverable_info, deliverable_info,
'ocata', 'ocata',
@ -1247,7 +1247,7 @@ class TestValidateStableBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_stable_branches( validate.validate_stable_branches(
deliverable_info, deliverable_info,
'_independent', '_independent',
@ -1272,7 +1272,7 @@ class TestValidateStableBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_stable_branches( validate.validate_stable_branches(
deliverable_info, deliverable_info,
'_independent', '_independent',
@ -1296,7 +1296,7 @@ class TestValidateStableBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_stable_branches( validate.validate_stable_branches(
deliverable_info, deliverable_info,
'ocata', 'ocata',
@ -1320,7 +1320,7 @@ class TestValidateStableBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_stable_branches( validate.validate_stable_branches(
deliverable_info, deliverable_info,
'ocata', 'ocata',
@ -1344,7 +1344,7 @@ class TestValidateStableBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_stable_branches( validate.validate_stable_branches(
deliverable_info, deliverable_info,
'ocata', 'ocata',
@ -1369,7 +1369,7 @@ class TestValidateStableBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_stable_branches( validate.validate_stable_branches(
deliverable_info, deliverable_info,
'ocata', 'ocata',
@ -1394,7 +1394,7 @@ class TestValidateStableBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_stable_branches( validate.validate_stable_branches(
deliverable_info, deliverable_info,
'ocata', 'ocata',
@ -1424,7 +1424,7 @@ class TestValidateFeatureBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_feature_branches( validate.validate_feature_branches(
deliverable_info, deliverable_info,
self.tmpdir, self.tmpdir,
@ -1449,7 +1449,7 @@ class TestValidateFeatureBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_feature_branches( validate.validate_feature_branches(
deliverable_info, deliverable_info,
self.tmpdir, self.tmpdir,
@ -1474,7 +1474,7 @@ class TestValidateFeatureBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_feature_branches( validate.validate_feature_branches(
deliverable_info, deliverable_info,
self.tmpdir, self.tmpdir,
@ -1499,7 +1499,7 @@ class TestValidateFeatureBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_feature_branches( validate.validate_feature_branches(
deliverable_info, deliverable_info,
self.tmpdir, self.tmpdir,
@ -1524,7 +1524,7 @@ class TestValidateFeatureBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_feature_branches( validate.validate_feature_branches(
deliverable_info, deliverable_info,
self.tmpdir, self.tmpdir,
@ -1556,7 +1556,7 @@ class TestValidateDriverfixesBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_driverfixes_branches( validate.validate_driverfixes_branches(
deliverable_info, deliverable_info,
self.tmpdir, self.tmpdir,
@ -1580,7 +1580,7 @@ class TestValidateDriverfixesBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_driverfixes_branches( validate.validate_driverfixes_branches(
deliverable_info, deliverable_info,
self.tmpdir, self.tmpdir,
@ -1605,7 +1605,7 @@ class TestValidateDriverfixesBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_driverfixes_branches( validate.validate_driverfixes_branches(
deliverable_info, deliverable_info,
self.tmpdir, self.tmpdir,
@ -1630,7 +1630,7 @@ class TestValidateDriverfixesBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_driverfixes_branches( validate.validate_driverfixes_branches(
deliverable_info, deliverable_info,
self.tmpdir, self.tmpdir,
@ -1655,7 +1655,7 @@ class TestValidateDriverfixesBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_driverfixes_branches( validate.validate_driverfixes_branches(
deliverable_info, deliverable_info,
self.tmpdir, self.tmpdir,
@ -1680,7 +1680,7 @@ class TestValidateDriverfixesBranches(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_driverfixes_branches( validate.validate_driverfixes_branches(
deliverable_info, deliverable_info,
self.tmpdir, self.tmpdir,
@ -1725,7 +1725,7 @@ class TestValidateSeriesOpen(base.BaseTestCase):
f.write(deliverable_data) f.write(deliverable_data)
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_series_open( validate.validate_series_open(
deliverable_info, deliverable_info,
'a', 'a',
@ -1753,7 +1753,7 @@ class TestValidateSeriesOpen(base.BaseTestCase):
f.write(deliverable_data) f.write(deliverable_data)
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_series_open( validate.validate_series_open(
deliverable_info, deliverable_info,
'a', 'a',
@ -1776,7 +1776,7 @@ class TestValidateSeriesOpen(base.BaseTestCase):
''') ''')
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_series_open( validate.validate_series_open(
deliverable_info, deliverable_info,
'_independent', '_independent',
@ -1812,7 +1812,7 @@ class TestValidateSeriesOpen(base.BaseTestCase):
f.write(deliverable_data) f.write(deliverable_data)
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_series_open( validate.validate_series_open(
deliverable_info, deliverable_info,
'a', 'a',
@ -1847,7 +1847,7 @@ class TestValidateSeriesFirst(base.BaseTestCase):
f.write(deliverable_data) f.write(deliverable_data)
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_series_first( validate.validate_series_first(
deliverable_info, deliverable_info,
'a', 'a',
@ -1878,7 +1878,7 @@ class TestValidateSeriesFirst(base.BaseTestCase):
f.write(deliverable_data) f.write(deliverable_data)
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_series_first( validate.validate_series_first(
deliverable_info, deliverable_info,
'a', 'a',
@ -1901,7 +1901,7 @@ class TestValidateSeriesFirst(base.BaseTestCase):
f.write(deliverable_data) f.write(deliverable_data)
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_series_first( validate.validate_series_first(
deliverable_info, deliverable_info,
'a', 'a',
@ -1928,7 +1928,7 @@ class TestValidateSeriesFirst(base.BaseTestCase):
f.write(deliverable_data) f.write(deliverable_data)
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_series_first( validate.validate_series_first(
deliverable_info, deliverable_info,
'a', 'a',
@ -1955,7 +1955,7 @@ class TestValidateSeriesFirst(base.BaseTestCase):
f.write(deliverable_data) f.write(deliverable_data)
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_series_first( validate.validate_series_first(
deliverable_info, deliverable_info,
'a', 'a',
@ -1982,7 +1982,7 @@ class TestValidateSeriesFirst(base.BaseTestCase):
f.write(deliverable_data) f.write(deliverable_data)
warnings = [] warnings = []
errors = [] errors = []
deliverable_info = yaml.safe_load(deliverable_data) deliverable_info = yamlutils.loads(deliverable_data)
validate.validate_series_first( validate.validate_series_first(
deliverable_info, deliverable_info,
'a', 'a',