From a507f38dc69019523ff02006622eb4ab84cd5ba1 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Thu, 12 Jul 2018 08:31:31 +0200 Subject: Improve dependency management MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It avoids declaring dependencies if needed. Negative regex are correcty managed as well. Change-Id: I0e978823526246bc4a5192e63a8a893a4add0e2a Signed-off-by: Cédric Ollivier --- xtesting/tests/unit/ci/test_tier_builder.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'xtesting/tests/unit/ci') diff --git a/xtesting/tests/unit/ci/test_tier_builder.py b/xtesting/tests/unit/ci/test_tier_builder.py index 58a9d9d0..402fc664 100644 --- a/xtesting/tests/unit/ci/test_tier_builder.py +++ b/xtesting/tests/unit/ci/test_tier_builder.py @@ -8,6 +8,7 @@ # pylint: disable=missing-docstring import logging +import os import unittest import mock @@ -41,8 +42,9 @@ class TierBuilderTesting(unittest.TestCase): with mock.patch('xtesting.ci.tier_builder.yaml.safe_load', return_value=self.mock_yaml), \ mock.patch('six.moves.builtins.open', mock.mock_open()): - self.tierbuilder = tier_builder.TierBuilder( - 'test_installer', 'test_scenario', 'testcases_file') + os.environ["INSTALLER_TYPE"] = 'test_installer' + os.environ["DEPLOY_SCENARIO"] = 'test_scenario' + self.tierbuilder = tier_builder.TierBuilder('testcases_file') self.tier_obj = self.tierbuilder.tier_objects[0] def test_get_tiers(self): -- cgit 1.2.3-korg