Do not use vitrage.utils.file module

We don't need vitrage dependency to load yaml files for tests.

Change-Id: Ie711b9cdafae8e80a476a6b4617d4a0a62e6033b
Story: #2004053
Task: #27059
This commit is contained in:
Ivan Kolodyazhny 2019-02-17 19:25:26 +02:00
parent 5b39209d8a
commit eba0757379
2 changed files with 4 additions and 3 deletions

View File

@ -5,6 +5,7 @@
pbr!=2.1.0,>=2.0.0 # Apache-2.0
aodhclient>=0.9.0 # Apache-2.0
PyYAML>=3.12 # MIT
python-heatclient>=1.10.0 # Apache-2.0
python-ceilometerclient>=2.5.0 # Apache-2.0
python-cinderclient>=3.3.0 # Apache-2.0

View File

@ -15,8 +15,7 @@
from oslo_log import log as logging
from testtools import matchers
from vitrage.utils import file
import yaml
from vitrage_tempest_plugin.tests.api.templates.base import BaseTemplateTest
from vitrage_tempest_plugin.tests.base import IsNotEmpty
@ -234,7 +233,8 @@ class TemplatesDBTest(BaseTemplateTest):
type=TTypes.STANDARD,
status=TemplateStatus.ACTIVE)
payload_from_db = self.client.template.show(db_row['uuid'])
payload_from_file = file.load_yaml_file(template_path)
with open(template_path, 'r') as stream:
payload_from_file = yaml.load(stream, Loader=yaml.BaseLoader)
self.assert_dict_equal(payload_from_file, payload_from_db,
"Template content doesn't match")
v_utils.delete_template(db_row['uuid'])