Update yaml.load to yaml.safe_load in Shipyard unit tests

In all honesty, the warnings that were output about unsafe yaml.load
while running unit tests in Shipyard were just kind of annoying.
They always made me think there was a unit test failure for a split
second. This patch set updates yaml.load to yaml.safe_load in the
configdocs helper unit tests. The unit tests themselves are
effectively unchanged, but now there are no warnings returned.

Change-Id: I65a5d55fbe9eb690ad534a5b7df882762bf5a9fb
This commit is contained in:
Carter, Matthew (mc981n) 2019-05-09 10:34:52 -05:00
parent e2a87a1830
commit c25a78fef4

View File

@ -365,7 +365,7 @@ def test__get_revision_dict_no_commit():
with a buffer version, but no committed revision
"""
helper = ConfigdocsHelper(CTX)
helper.deckhand.get_revision_list = lambda: yaml.load("""
helper.deckhand.get_revision_list = lambda: yaml.safe_load("""
---
- id: 1
url: https://deckhand/api/v1.0/revisions/1
@ -420,7 +420,7 @@ def test__get_revision_dict_commit_no_buff():
with a committed and no buffer revision
"""
helper = ConfigdocsHelper(CTX)
helper.deckhand.get_revision_list = lambda: yaml.load("""
helper.deckhand.get_revision_list = lambda: yaml.safe_load("""
---
- id: 1
url: https://deckhand/api/v1.0/revisions/1
@ -457,7 +457,7 @@ def test__get_revision_dict_commit_and_buff():
with a committed and a buffer revision
"""
helper = ConfigdocsHelper(CTX)
helper.deckhand.get_revision_list = lambda: yaml.load("""
helper.deckhand.get_revision_list = lambda: yaml.safe_load("""
---
- id: 1
url: https://deckhand/api/v1.0/revisions/1
@ -879,7 +879,7 @@ def test_get_revision_dict_last_site_action_and_successful_site_action():
for last_site_action and successful_site_action revision
"""
helper = ConfigdocsHelper(CTX)
helper.deckhand.get_revision_list = lambda: yaml.load("""
helper.deckhand.get_revision_list = lambda: yaml.safe_load("""
---
- id: 1
url: https://deckhand/api/v1.0/revisions/1
@ -1026,7 +1026,7 @@ def test_check_intermediate_commit():
helper_no_revs.deckhand.get_revision_list = lambda: []
helper_no_intermidiate_commits = ConfigdocsHelper(CTX)
revs = yaml.load("""
revs = yaml.safe_load("""
---
- id: 1
url: https://deckhand/api/v1.0/revisions/1